Best Way to Create Toggles

  • Thread starter Thread starter excel wonk
  • Start date Start date
E

excel wonk

What's the best way of creating toggles. For example, want to have
the user select Yes or No and make cells do calculations based on the
answer.

Any useful hints from web sites? thanks
 
One way follows below..............There are many methods and "best" is a
subjective term that will differ depending upon whichever ox is getting gored.

Select A1 and Data>Validation>Allow>List

In "Source" box type in yes,no with the comma and no spaces

In B1 enter this formula

=IF(A1="Yes",SUM($D$1:$D$10),SUM($E$1:$E$10))

Click on A1 and choose yes or no from the dropdown arrow.

B1 will SUM either range depending upon the value picked at A1


Gord Dibben MS Excel MVP
 
In "Source" box type in yes,no with the comma and no spaces
In B1 enter this formula
=IF(A1="Yes",SUM($D$1:$D$10),SUM($E$1:$E$10))

Dude, that's brilliant. I thought you had to use VBA to create this
simple toggle. I guess the buzzword to look for when searching for
Excel's not too great Help function is the "drop down list."

You get a gold star for this elegant solution, MVP.
 
Thanks for the feedback.

The closest I ever got before to "brilliant" was in the 50's when I used
BrylCreem to hold my ducktail in place.


Gord
 
We called ours a "D A"

You know what the "A" stands for!<g>
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"Gord Dibben" <gorddibbATshawDOTca> wrote in message
Thanks for the feedback.

The closest I ever got before to "brilliant" was in the 50's when I used
BrylCreem to hold my ducktail in place.


Gord
 
BTW - we used WildRoot Creme Oil.
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

We called ours a "D A"

You know what the "A" stands for!<g>
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"Gord Dibben" <gorddibbATshawDOTca> wrote in message
Thanks for the feedback.

The closest I ever got before to "brilliant" was in the 50's when I used
BrylCreem to hold my ducktail in place.


Gord
 
Back
Top