Lookup cell reference and lock cell

L

Legacy 287389

Guest
Hi good people!,

On my sheet are cell references in text, in cells A1, A3, A5 and so on. (all the odd rows). This is on sheet "update rooms". lets say A1 shows "C25", A3 "B16", A5 "C27", etc. What I would like VBA to do is look at the values of these cells, in other words look at C25, B16 and C27, but on the "Database" sheet, and if the value of those cells is "na()", I need VBA to lock A2, A4 and A5 on the "update rooms" sheet.

NOTE: there are 30 of these paired cells scattered over columns A-G. All 30 cells (Odd rows) will change together depended on a drop down. All cells when they change must be looked at in the "database" sheet, and if any of those cells contain "na()", the cell just below (on the "update rooms" sheet),must lock.

All and any help with this will be accepted with great admiration and gratefulness!..Thank you..
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,461
Messages
5,831,778
Members
430,089
Latest member
Jane434

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
Top