View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luke M[_4_] Luke M[_4_] is offline
external usenet poster
 
Posts: 457
Default Change formulas in a column based on a selection.

By "selecting the column" I'll assume you use a dropdown, (which has a
integer output). If you link this to cell B3, your single formula is then:
=IF($B2,OFFSET(I2,,B3-1),"")

As the number in B3 changes, the cell that is returned by this formula will
change.

--
Best Regards,

Luke M
"Ephraim" wrote in message
...
I have checkboxes from the forms toolbar in Column A linked to
corresponding Cells in Column B.

I have this formula in the corresponding cell in Column E
=IF($B2,"Computer 1","")
So when checkbox A2 is checked it displays "Computer 1" in Cell E2

I have this formula in the corresponding cell in Column F
=IF($B2,I2,"")
So when checkbox A2 is checked it displays the value in Cell I2.

What I'd like to accomplish is to have a way to select the heading for
Column I, J, K, L or M so that all the formulas in column F would
change based on that selection.

i.e. The formulas in Column F would change to
=IF($B2,I2,"") 'If column I was selected
=IF($B2,J2,"") 'If column J was selected
=IF($B2,K2,"") 'If column K was selected
=IF($B2,L2,"") 'If column L was selected
=IF($B2,M2,"") 'If column M was selected

What I am currently doing is changing the formula in Cell F and
dragging it down to replace all the other formulas.

A macro to change the formulas would be much easier.

Thanks,
Ephraim