IF formula with VLOOKUP help needed

misspoppy

New Member
Joined
Mar 4, 2015
Messages
12
Hello,

I'm trying to create a formula that would look at a column (G in my worksheet) and if the word "re-promo" is showing it would look for that word in my lookup data. The cells in this column only show this word or nothing but both are the result of a formula in the column.

For those rows where column G shows blank result I want my formula to look up the word from Column F (also the result of a formula)

Basically if there is text in Column G use that as a precedent to look up data.


My formula is

=IF(G3="re-promo",VLOOKUP(G3,CALS!$A$12:$H$22,IF(H3="SD",3,IF(H3="HD",4))),VLOOKUP(F3,CALS!$A$12:$H$25,IF(I3="LVR.1",IF(H3="SD",3,IF(H3="HD",4)),IF(I3="LVR.2",IF(H3="SD",5,IF(H3="HD",6))))))

Only the first part of the formula works. The moment I delete the cells in Column G the value calculated is incorrect albeit it appears in my lookup data.



Any help is greatly appreciated.

Misspoppy
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Can you post sample data either here or to dropbox, be much easier to evaluate what you are doing.
 
Upvote 0
Working sheet
Columns showing are F to L
CATRe-promotion DEF LVR BUYS Share % MFPB
Library features HDLVR.2450%1.6
Library features SDLVR.2150%1.2
Current Are-promoSDLVR.26660%2.08
Current Are-promoSDLVR.232360%2.08
Current E SDLVR.19465%2.59
Current E SDLVR.1285665%2.59
Current Are-promoHDLVR.22560%2.6
Current Bre-promoHDLVR.22460%2.6
Current E SDLVR.15265%2.59
Current E SDLVR.192365%2.59

<colgroup><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>

<colgroup><col><col><col><col><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>

The formula I'm working on is in Column L (MFPB)



On a separate tab (CALS) I have the look up values starting from A10

LVR.1 LVR.2
CategoryMLF YEAR 1MFPB SDMFPB HDMFPB SDMFPB HD
Megahit447072.593.112.082.60
Current A330002.593.112.082.60
Current B242002.593.112.082.60
Current C100002.593.112.082.60
Current D50002.593.112.082.60
Current E27502.593.112.082.60
NTR/DTV/MOW20002.072.592.082.60
NTR/MOW/DTV20002.072.592.082.60
re-promo01.922.401.922.40
Library Features - Megahits01.201.601.201.60
Library features01.201.601.201.60

<colgroup><col><col><col span="2"><col><col></colgroup><tbody>
</tbody>


Will these work?
 
Upvote 0
No it won't paste into a spreadsheet!
It looks like some of the closing")" for if statements where in wrong place. Try -
=IF(G3="re-promo",VLOOKUP(G3,cals!$A$12:$H$25,IF(H3="SD",3,IF(H3="HD",4,VLOOKUP(F3,cals!$A$12:$H$25,IF(I3="LVR.1",IF(H3="SD",3,IF(H3="HD",4,IF(I3="LVR.2",IF(H3="SD",5,IF(H3="HD",6)))))))))))
 
Upvote 0
Darn. I chopped the size of the data and may have deleted that row. (faceslap)
Can you copy it from my original posting? It should be in the MFPB column

Many thanks
 
Upvote 0
Alternatively because the current formula in MFPB column is working the G column could be get rid of altogether and its formula included in the Column F current formula. But not sure how to do that without messing it up.
 
Upvote 0
Test this see if results are correct
=IF(G2="re-promo",VLOOKUP(G2,CALS!$A$12:$H$25,IF(H2="SD",3,IF(H2="HD",4))),VLOOKUP(F2,CALS!$A$12:$H$25,IF(AND(I2="LVR.1",H2="SD"),3,IF(AND(I2="LVR.1",H2="HD"),4,IF(AND(I2="LVR.2",H2="SD"),5,IF(AND(I2="LVR.2",H2="HD"),6))))))
 
Upvote 0

Forum statistics

Threads
1,215,641
Messages
6,125,982
Members
449,276
Latest member
surendra75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top