Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace based on combobox value
I currently have a combobox that shades in cells based on
a combobox value. Each cell has a formula that inputs a cells value based on another cells value unless the value is "0". If the value is "0" it inputs "SPARE" but if the cell is shaded via the combobox, I want the input for a "0" value to be "N/A". How is this done if possible? Can I do the formula based on the cell shading or does it have to be set to the combobox. Any help is appreciated, Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace based on combobox value
Is all this work done by code?
If yes, then maybe you can just check the values and the shading (does shading mean fill color?). Option Explicit Sub testme01() With ActiveSheet If .Range("a1").Value = 0 Then If .Range("b1").Interior.ColorIndex = 6 Then .Range("b1").Value = "N/A" Else .Range("b1").Value = "SPARE" End If Else 'not sure what happens here End If End With End Sub I used a .colorindex of 6. Probably not what you're using. (But I'm not sure if I understood the question.) Mike wrote: I currently have a combobox that shades in cells based on a combobox value. Each cell has a formula that inputs a cells value based on another cells value unless the value is "0". If the value is "0" it inputs "SPARE" but if the cell is shaded via the combobox, I want the input for a "0" value to be "N/A". How is this done if possible? Can I do the formula based on the cell shading or does it have to be set to the combobox. Any help is appreciated, Mike -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Copy range of cells based on Combobox Selection | Excel Programming | |||
Texbox values based on Combobox Value(more detail) | Excel Programming | |||
Texbox values based on Combobox Value(more detail) | Excel Programming | |||
Having data populate text boxes based on Combobox Value | Excel Programming | |||
Combobox populating based on Option Button | Excel Programming |