#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
NavEx
 
Posts: n/a
Default Toggle Button

Purpose: Wants to apply two different formulas in a cell, not simultaneously
Question: How can I use a toggle button to apply different formulas to a
cell or array?
Example: Difference of two values - Number and Percentage
or
Formula calculating yearly profit for 1st, 2nd, 3rd.............. year
and
formula calculating accumulated profit for 1st, 2nd, 3rd ............year
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Toggle Button

Here's a simple example set-up
to toggle formulas in a col using a forms combo box ..

Implemented sample is available at:
http://www.savefile.com/files/4325613
Toggling Formulas using a Forms Combo Box.xls

Source table assumed in A1: C4, eg:

Sales 2004 2005
Item1 10 11
Item2 12 13
Item3 10 17

Input 2 labels in say, I1:I2

Diff
%Diff

Draw a combo box from the forms toolbar
Right-click Format control, make the settings:

Input range: $I$1:$I$2
Cell link: $E$1
(col E can be hidden away)

Then place
in D1: =IF(E1=1,I1,I2)
in D2, copied down:
=IF(E$1=1,C2-B2,TEXT((C2-B2)/B2,"0%"))

Col D will show/compute either the Difference
or the % Difference in Sales 2004 - 2005,
depending on the selection made in the combo box

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"NavEx" wrote:
Purpose: Wants to apply two different formulas in a cell, not simultaneously
Question: How can I use a toggle button to apply different formulas to a
cell or array?
Example: Difference of two values - Number and Percentage
or
Formula calculating yearly profit for 1st, 2nd, 3rd.............. year
and
formula calculating accumulated profit for 1st, 2nd, 3rd ............year

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
toggle button text color John Davies Excel Discussion (Misc queries) 5 December 12th 05 06:43 PM
Toggle Button mick2 Excel Discussion (Misc queries) 5 November 27th 05 05:52 AM
Toggle button keithl816 Excel Discussion (Misc queries) 2 November 21st 05 09:16 PM
Place the caption of a toggle button into a cell [email protected] Excel Worksheet Functions 2 May 12th 05 04:47 AM
Toggle betwen "editing" and "pushing" a button in excel brjohnson9 Excel Discussion (Misc queries) 1 December 9th 04 12:02 AM


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"