Solved

Excel question reagrding color control

Posted on 2016-09-17
3
23 Views
Last Modified: 2016-10-07
How can I color a row green if I see a certain value in a given cell in that row?
0
Comment
Question by:Malibucompany
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
crystal (strive4peace) - Microsoft MVP, Access earned 250 total points (awarded by participants)
ID: 41803472
you can use conditional formatting

select the range of cells to format

pick Conditional Formatting from the HOME ribbon tab

choose New Rule...

choose Use a formula to determine which cells to format

if the active cell of the selected range is in row 2 and the cell you want to look at is in column A, under Format values where this formula is true, enter:
=$A2=1

Open in new window

WHERE
1 is the value you want to compare to -- naturally you will want to change this. If it is text, use quotes around the value: "my text value"
A has $ in front so it will not be adjusted. The row needs to be adjusted so it is a relative reference.

then click the Format command button in  the lower right and pick what you want to do
(notice the tabs across the top with other options in the dialog box -- Number, Font, Border, Fill)
1
 
LVL 10

Assisted Solution

by:HuaMinChen
HuaMinChen earned 250 total points (awarded by participants)
ID: 41803726
Hi,
The following is one example to change Foreground color of cell:

Sub CreateWorkbook()
    ' CreateWorkbook Macro
    ' This macro is used to create a workbook for the
    ' Georgetown Dry Cleaning Services

    ' Keyboard Shortcut: Ctrl+Shift+W
    
    Rem Just in case there is anything on the
    Rem worksheet, delete everything
    Range("A:K").Delete
    Range("1:20").Delete
    
    Rem Create the sections and headings of the worksheet
    Range("B2") = "Georgetown Dry Cleaning Services"
    Range("B2").Font.Name = "Rockwell Condensed"
    Range("B2").Font.Size = 24
    Range("B2").Font.Bold = True
    Range("B2").Font.Color = vbBlue
    
    Range("B3:J3").Interior.ThemeColor = xlThemeColorLight2
    
    Range("B5") = "Order Identification"
    Range("B5").Font.Name = "Cambria"
    Range("B5").Font.Size = 14
    Range("B5").Font.Bold = True
    Range("B5").Font.ThemeColor = 5
    
    . . . No Change
          
    Range("B13") = "Items to Clean"
    Range("B13").Font.Name = "Cambria"
    Range("B13").Font.Size = 14
    Range("B13").Font.Bold = True
    Range("B13").Font.ThemeColor = 5
    
    Range("B14") = "Item"
    Range("D14") = "Unit Price"
    Range("E14") = "Qty"
    Range("F14") = "Sub-Total"
    
    . . . No Change
    
    Range("H15") = "Order Summary"
    Range("H15").Font.Name = "Cambria"
    Range("H15").Font.Size = 14
    Range("H15").Font.Bold = True
    Range("H15").Font.ThemeColor = 5
    
    . . . No Change

Open in new window

0
 
LVL 18
ID: 41833339
poster didn't come back so it is difficult to know what was tried
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now