Formula defines range or runs macro

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

We are trying to find a way to change a range name area based on the data in
a cell. For instance if cell A5=10 it will change a defined range name
"motor" to specific cells B10:C15 on another sheet. If cell A5 is then
changed to 20 the range name will change to B10: C25 etc.

Another option we could use is if cell A5=10 run a specific macro. We have
tried to write a conditional statement that will fire the macro when a
condition is met but that didn't work. Does anyone have any ideas on how to
make this work? Thanks in advance for any assistance you can provide.
 
one way:

Choose Insert/Name/Define

enter motor in the Name in workbook: field, and in the Refers to:
field enter:

=OFFSET('Sheet2'!$B$10,0,0,'Sheet1'!$A$5-4,2)

Adjust your sheet names to suit...
 
Back
Top