Excel help

mukeshc

New Member
Joined
Feb 10, 2017
Messages
20
Hi

i am working on an excel query were i want to identify certain cell colour b and on the basis of that want next cell to be tagged as following:

If cell is yellow then next cell should be tagged as formulated
if cell is red then it should be tagged as average.

thanks in advance.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
if a conditional formatting formula makes a cell yellow, use the same formula to make next cell "formulated"
 
Upvote 0
Is the cell colour filled in manually or is it the result of conditional formatting? In which column are the coloured cells? When you say "tagged as formulated" and " tagged as average", do you mean that you want either the word "formulated" or the word "average" placed in the adjacent cell?
 
Upvote 0
is the cell colour filled in manually or is it the result of conditional formatting? In which column are the coloured cells? When you say "tagged as formulated" and " tagged as average", do you mean that you want either the word "formulated" or the word "average" placed in the adjacent cell?


yes i am filling cell colour manually.
 
Upvote 0
then change to conditional formatting - you must have a "rule" that tells you what color is required...............
 
Upvote 0
If you are manually highlighting the colors, and there is no "rhyme or reason" (pattern/logic) dictating which cells are being colored, you would need to use VBA to do what you want.
 
Upvote 0
This macro assumes that your colored cells are in column B starting at row 2.
Code:
Sub ColorCells()
    Application.ScreenUpdating = False
    Dim LastRow As Long, rng As Range
    LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    For Each rng In Range("B2:B" & LastRow)
        Select Case rng.Interior.ColorIndex
            Case Is = 6
                rng.Offset(0, 1) = "Formulated"
            Case Is = 3
                rng.Offset(0, 1) = "Average"
        End Select
    Next rng
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Or you could just put a legend at the top of the sheet that says Yellow means "Formulated", Red means "Average".
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top