Option Group State Decision "Nested Ifs" or Other?

RichKat

New Member
Joined
Nov 8, 2009
Messages
34
Hello, I have a group of 19 option buttons and the state of the group is linked to a separate cell (J16). Depending on the state of the group (1-19) I would like to choose a value from cells I16 to I34 (with I16 being 1 and I34 being 19) and stick that value in a Named Range.

What function or technique should I use and can you give an example since I am relatively new to this.

Using Office 2007 Professional on Vista Home Premium
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
23,904
Something like
Code:
Range("namedRange").Value = Range("I15").Offset(Range("J16").Value, 0).Value
 

RichKat

New Member
Joined
Nov 8, 2009
Messages
34
Hi Mike,

Thanks for the quick answer. How would I make this code auto calculate and stay current? I need to make sure the named range stays current without pushing a button. Is there a function that would do the same thing?
 

RichKat

New Member
Joined
Nov 8, 2009
Messages
34
Wow! I'm stunned! :)

Such an eloquent solution compared to 19 nested IF's!!! :biggrin:

Thanks Mike! Sorry to bother you with such elementary questions.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,464
Messages
5,596,288
Members
414,052
Latest member
Dual Showman

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