Cell Data Validation using LOOKUP?

Chunky_22

Board Regular
Joined
May 19, 2004
Messages
149
Hi

I have a table in Sheet 2, A3:E21. Column A is Company Names, Column E is 'funds available' dollar values

In Sheet 1, I need users to enter how much they have spent with each Company. In column D is a drop down list of company names, and column E is where you enter what you've spent.

I would like to use something like Data Validation on the cell in Column E. I need it to look at what company name the user has selected from the drop down, and then VLOOKUP that company on Sheet 2 to see if the value they have entered exceeds the funds available. If they have exceeded the amount available, a pop up or some other notification needs to be presented to the user.

If this is achievable with macros that's also no problem, I have no skills in this area but can copy and paste code :)

Thanks in advance for your help.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Sheet1!D1 is where you enter the company name
Sheet1!E1 is where you enter the value

Use Custom Data Validation with formula

=OR(D1="",E1=0,E1<=VLOOKUP(D1,Sheet2!A$3:E$21,5,0))

NOTE: Data Validation can be bypassed by pasting a value into the cell containg the validation
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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