Excel 2003; value depending on adjacent cells

network_engineer

New Member
Joined
May 14, 2011
Messages
37
Hi all,

How could I validate that cells do not have values higher than the adjacent cells? E.g. B1 should never be greater than A1. I know we could use the Data >> Validation; how would I do it if I wanted it across a whole range?

B1:B40000 should never be greater than the respective adjacent cells in column A?

Thanks.

Kind regards.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Select the whole range you want the validation applied to then set the max value permitted to =A1

Note that validation doesn't work if the reference cell is empty.
 
Upvote 0
Hi,

Welcome to MrExcel.

Highlight column B2:B?????.
Go to Data Validation ( alt A V V )
Select Whole Number from the Allow Drop down.
Select Less than or Equal to from the Data Drop down.
In the Maximum box put =A2
You can add an Error Message to the Data Validation if you wish.
Click OK

I hope that works for you.

Ak
 
Upvote 0
Hi again,

Sorry, I hit some errors. So, let me update the cell references and then explain:

I have numerical values in cells C4, D4, andE4, i.e. C4:E4. I have a validation in place on the range C4:E4 that allows only one of these cells (C4, D4, or E4) to filled in at any given point of time.

Now, in F4, I wish that values filled would never exceed the value filled in C4 through E4.

I have the validation in place, i.e. Data Validation, Validation Criteria, Allow Whole Number, Maximum value to be C4:E4; however, this works ONLY for C4. If the value in D4 is 2, then I still get an error if I enter 1 in F4. Did I miss something?

Help!

Thanks.

Kind regards.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

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