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 to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,214,921
Messages
6,122,280
Members
449,075
Latest member
staticfluids

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