Basically, I have a set of values being graphed. The values change depending on the buttons that have been toggled. Sometimes the values are revenue numbers and sometimes they are sales volume numbers. The cell next to the values is a header like "Revenue (MM USD)" and changes to "Volume (000s Units)" when volume is toggled.
I'd like to make the cells display in number formatting when volume is toggled and as currency when revenue is toggled.
Any help would be greatly appreciated. I apologize if I didn't include any important information, but I'll be quick to respond to any inquiries.
Thanks
Hi
You could try to adapt the following code. This changes the Heading in cell A2 and the format in B2 from Number to US dollars.
Private Sub ToggleButton1_Click() Select Case Me.ToggleButton1.Value Case Is = True Range("A2") = "Revenue (MM USD)" Range("B2").NumberFormat = "[$$-409]#,##0.00" Case Is = False Range("A2") = "Volume (000s Units)" Range("B2").NumberFormat = "#,##0.00" End Select End Sub
Hi,
You could try the following:
Select all desired cells that need to change formatting type, then go to:
Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format >
At the bottom, enter the following formula:
=$A1="Volume (000s Units)" where A1 is the cell that the formatting is based upon
Then click 'Format' and choose the options you wish from there. Note that if you use this method you should format the cells as $ Currnency to begin with, they should then change when you toggle to "Volume (000s Units)".
I hope that helps!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks