R
Ranjit kurian
I have four columns, i need a macro to fill my fifth column using IF conditions
The Fist column contains Aging details like 1-30,31-60,61-90,91-180,181-360
and >360, this is always fixed.
The Second column contains Frequency details like Monthly,Quarterly, Semi
Annual, Annual this is always fixed.
The Third column contains Ages of Pymt details, here we have a numbers
begins from 1 till no end, but we have three categories here like >=61 or =
blank etc....
The fourth column contains Month details in this formate MMM/YY(Jan/09) (the
months and years are not fixed it can be any month any year)
The Fifth is my result column (Category), i need a macro as explained below
For Aging 1-30 and 31-60 there are no conditions, for these two aging the
fifth cloumn
(Category) result should be B/P
For Aging:61-90, Frequency:Quarterly,Annual,Semi Annual, for these the fifth
cloumn
(Category) result should be B/P
IF the Frequency: Monthly, Age of Pymt : <61,Month: Current month/Previous
month (Jan/09, Dec/08) then the fifth cloumn (Category) result should be B/P
IF the Frequency: Monthly, Age of Pymt : <61,Month: Prior to Current
month/Previous month (Nov/08, Feb/08) then the fifth cloumn (Category)
result should be NB/P
IF the Frequency: Monthly, Age of Pymt : >=61 or =blank ,Month: Current
month/Previous month (Jan/09, Dec/08) then the fifth cloumn (Category)
result should be B/NP
IF the Frequency: Monthly, Age of Pymt : >=61 or =blank ,Month: Prior to
Current month/Previous month (Nov/08, Feb/08) then the fifth cloumn
(Category) result should be NB/NP
IF the Frequency: Quarterly, Age of Pymt : <121,Month: Current
month/Previous month (Jan/09, Dec/08,Nov/08 take three months) then the fifth
cloumn (Category) result should be B/P
IF the Frequency: Quarterly, Age of Pymt : <121,Month: Prior to Current
month/Previous month (Oct/08, sept/08, Aug/08 take three months) then the
fifth cloumn (Category) result should be NB/P
IF the Frequency: Quarterly, Age of Pymt : >=121 or =blank,Month: Current
month/Previous month (Jan/09, Dec/08,Nov/08 take three months) then the fifth
cloumn (Category) result should be B/NP
IF the Frequency: Quarterly, Age of Pymt : >=121 or =blank,Month: Prior
Current month/Previous month (Oct/08, sept/08, Aug/08 take three months) then
the fifth cloumn (Category) result should be NB/NP
IF the Frequency: Annual, Age of Pymt : <181,Month: Current month/Previous
month (from current month calculate 12 months Jan/09 till Feb/08) then the
fifth cloumn (Category) result should be B/P
IF the Frequency: Annual, Age of Pymt : <181,Month: Prior to Current
month/Previous month (Jan/08, Dec/07) then the fifth cloumn (Category) result
should be NB/P
IF the Frequency: Annual, Age of Pymt : >=181 or =blank,Month: Current
month/Previous month (from current month calculate 12 months Jan/09 till
Feb/08) result should be B/NP
IF the Frequency: Annual, Age of Pymt : >=181 or =blank,Month: Prior Current
month/Previous month (Jan/08, Dec/07) then the fifth cloumn (Category) result
should be NB/NP
The Fist column contains Aging details like 1-30,31-60,61-90,91-180,181-360
and >360, this is always fixed.
The Second column contains Frequency details like Monthly,Quarterly, Semi
Annual, Annual this is always fixed.
The Third column contains Ages of Pymt details, here we have a numbers
begins from 1 till no end, but we have three categories here like >=61 or =
blank etc....
The fourth column contains Month details in this formate MMM/YY(Jan/09) (the
months and years are not fixed it can be any month any year)
The Fifth is my result column (Category), i need a macro as explained below
For Aging 1-30 and 31-60 there are no conditions, for these two aging the
fifth cloumn
(Category) result should be B/P
For Aging:61-90, Frequency:Quarterly,Annual,Semi Annual, for these the fifth
cloumn
(Category) result should be B/P
IF the Frequency: Monthly, Age of Pymt : <61,Month: Current month/Previous
month (Jan/09, Dec/08) then the fifth cloumn (Category) result should be B/P
IF the Frequency: Monthly, Age of Pymt : <61,Month: Prior to Current
month/Previous month (Nov/08, Feb/08) then the fifth cloumn (Category)
result should be NB/P
IF the Frequency: Monthly, Age of Pymt : >=61 or =blank ,Month: Current
month/Previous month (Jan/09, Dec/08) then the fifth cloumn (Category)
result should be B/NP
IF the Frequency: Monthly, Age of Pymt : >=61 or =blank ,Month: Prior to
Current month/Previous month (Nov/08, Feb/08) then the fifth cloumn
(Category) result should be NB/NP
IF the Frequency: Quarterly, Age of Pymt : <121,Month: Current
month/Previous month (Jan/09, Dec/08,Nov/08 take three months) then the fifth
cloumn (Category) result should be B/P
IF the Frequency: Quarterly, Age of Pymt : <121,Month: Prior to Current
month/Previous month (Oct/08, sept/08, Aug/08 take three months) then the
fifth cloumn (Category) result should be NB/P
IF the Frequency: Quarterly, Age of Pymt : >=121 or =blank,Month: Current
month/Previous month (Jan/09, Dec/08,Nov/08 take three months) then the fifth
cloumn (Category) result should be B/NP
IF the Frequency: Quarterly, Age of Pymt : >=121 or =blank,Month: Prior
Current month/Previous month (Oct/08, sept/08, Aug/08 take three months) then
the fifth cloumn (Category) result should be NB/NP
IF the Frequency: Annual, Age of Pymt : <181,Month: Current month/Previous
month (from current month calculate 12 months Jan/09 till Feb/08) then the
fifth cloumn (Category) result should be B/P
IF the Frequency: Annual, Age of Pymt : <181,Month: Prior to Current
month/Previous month (Jan/08, Dec/07) then the fifth cloumn (Category) result
should be NB/P
IF the Frequency: Annual, Age of Pymt : >=181 or =blank,Month: Current
month/Previous month (from current month calculate 12 months Jan/09 till
Feb/08) result should be B/NP
IF the Frequency: Annual, Age of Pymt : >=181 or =blank,Month: Prior Current
month/Previous month (Jan/08, Dec/07) then the fifth cloumn (Category) result
should be NB/NP