ashish mehra
Active Member
Hi all,
I working on a project that contains extensive usage of IF & Vlookup formulas. I am looking for a vba based solution to replace the formulas.
Working:
On the basis of the Product & Source columns; I have setup formulas which look something like this:
1) Start Date
2) Amount
3) Status
This is one combination of Product & Source columns; there are 8 more combinations.
The list of columns continues till 30; i.e. for every column there is a separate formula need to be evaluated.
Regards,
AM
I working on a project that contains extensive usage of IF & Vlookup formulas. I am looking for a vba based solution to replace the formulas.
Working:
On the basis of the Product & Source columns; I have setup formulas which look something like this:
1) Start Date
=IF(AND(J3="NCR",O3="PWD"),VLOOKUP(M3,'[Dummy Source.xlsb]NCR_PWD'!$B:$FK,42,0),IF(AND(J3="LOP",O3="PWD"),VLOOKUP(M3,'[Dummy Source.xlsb]LOP_PWD'!$B:$GI,40,0),IF(AND(J3="NPSC",O3="PWD"),VLOOKUP(M3,'[Dummy Source.xlsb]NPSC_PWD'!$B:$GK,47,0),"Check Formula")))
2) Amount
=IF(AND(J3="NCR",O3="PWD"),VLOOKUP(M3,'[Dummy Source.xlsb]NCR_PWD'!$B:$FK,162,0),IF(AND(J3="LOP",O3="PWD"),VLOOKUP(M3,'[Dummy Source.xlsb]LOP_PWD'!$B:$GI,186,0),IF(AND(J3="NPSC",O3="PWD"),VLOOKUP(M3,'[Dummy Source.xlsb]NPSC_PWD'!$B:$GK,188,0),"Check Formula")))
3) Status
=IF(AND(J3="NCR",O3="PWD"),VLOOKUP(M3,'[Dummy Source.xlsb]NCR_PWD'!$B:$FK,19,0),IF(AND(J3="LOP",O3="PWD"),VLOOKUP(M3,'[Dummy Source.xlsb]LOP_PWD'!$B:$GI,17,0),IF(AND(J3="NPSC",O3="PWD"),VLOOKUP(M3,'[Dummy Source.xlsb]NPSC_PWD'!$B:$GK,20,0),"Check Formula")))
This is one combination of Product & Source columns; there are 8 more combinations.
The list of columns continues till 30; i.e. for every column there is a separate formula need to be evaluated.
Regards,
AM