Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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
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
Excel - Copy range of cells based on Combobox Selection Excel-erate2004 Excel Programming 2 April 3rd 04 05:35 PM
Texbox values based on Combobox Value(more detail) Todd Huttenstine[_2_] Excel Programming 1 November 11th 03 12:26 AM
Texbox values based on Combobox Value(more detail) Todd Huttenstine[_2_] Excel Programming 6 November 10th 03 01:49 PM
Having data populate text boxes based on Combobox Value Todd Huttenstine[_2_] Excel Programming 1 November 10th 03 01:35 AM
Combobox populating based on Option Button Todd Huttenstine[_2_] Excel Programming 7 November 9th 03 10:18 PM


All times are GMT +1. The time now is 07:04 AM.

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"