Macro for formula need to change based on cell value

maheshrk81

Board Regular
Joined
Jan 5, 2010
Messages
153
Hi All,

I need a macro where the formula should get updated based on cell value.
I have a refresh button, when i select the refresh button, my Cell T1, U1, V1 and W1 should get updated as below.

If my Cell "A1" is "All" then Cell T1 "All" else "Vlookup(formula)".
If my Cell "B1" is "All" then Cell U1 "All" else "Vlookup(formula)".
If my Cell "C1" is "All" then Cell V1 "All" else "Vlookup(formula)".
If my Cell "D1" is "All" then Cell W1 "All" else "Vlookup(formula)".

Thanks in Advance.
Maheshrk
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,224,827
Messages
6,181,199
Members
453,022
Latest member
RobertV1609

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