Impossible Vlookup + IF function

rentadane

New Member
Joined
Mar 16, 2011
Messages
5
I have the following issue where i have to analyze actual bookings, and ensure they follow the allowed combination criteria. How can i make an excel vlookup/macro which compares the actual bookings to the allowed combinations, and if they dont meet the allowed criteria, returns an N/A?

Actual booking

Account: 250, Organization: 1, Region: 90

Valid Combination

Account: 250, Organization: 2, Region: 01~69

Validation

Account: 250, Organization: IF(OR(cell>1;cell<9); cell;"#NA"), Region: IF(OR(cell>1;cell<69); G4;"#NA")


What i am attempting to do, is add a vlookup on account 250 in the actual bookings sheet, which refers to account 250 in the validation sheet, and returns an organization code IF it is a valid combination, otherwise "#NA". I added the validation sheet to avoid having to type every possible combination.

So the problem is trying to link a vlookup function to an IF function, i.e. only vlookup IF criterion are met, and return the true value. If the above validation would work, it would return Account: 250, Organization: #NA, Region: #NA based on the above actual bookings
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,224,598
Messages
6,179,820
Members
452,946
Latest member
JoseDavid

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