Color Rows With A Macro

Oct 16, 2008

I need a macro to color rows as follows -

If the cell contains: Closed then highlight the row Light Red
If the cell contains: In Progress then highlight the row Light Green
If the cell contains: Pending then highlight the row Yellow
If the cell contains: Assigned then highlight the row Light Blue

View 14 Replies


ADVERTISEMENT

Macro: Changing Color Of Coloumn Header Based On Rows Color

Jan 15, 2009

I wrote a macro to color the cell values in the rows based on their average value. For eg if the cell value is less than 0.2 Avg, they should be red color,if value is between 0.2 and 0.5 it should be yellow. This part is working fine

Now based on the color of the rows cells , need to write a macro for the header one. Logic is Coloum header should be in red colour, if in one or more number of rows cells are red. same with yellow ones. Could you please help me out in solving this with logic.

View 8 Replies View Related

Macro To Color Alternating Rows

Apr 13, 2009

I was wondering, what would the macro be to colour alternating rows.

So I could select the range of rows, hit the macro - and it would colour them for me?

I need it to do alternating green / lightgreen. For one, but I need to do other colours afterwards as well. So what would the code be to do this?

View 10 Replies View Related

Macro Script To Delete All Rows Hidden Using Conditional Formatting Color

Oct 6, 2011

After red filling certain cells based on some conditional formatting, I apply a filter to hide them. Now I need to delete them using a macro script.

View 9 Replies View Related

Alternate The Background Color (fill Color) Of Rows In A Spreadsheet

Aug 19, 2009

how I can alternate the background color (fill color) of rows in a spreadsheet. Say I wanted every other row to be gray starting at row 10.

View 6 Replies View Related

Macro To Color Cells Based On Their Font Color

Jun 18, 2008

I have a spreadsheet that i download from the net daily, which is seperated into columns of information.

I want to be able to look down a column and mark a cell in a seperate column if the cell font text is red.

For example looking down column A ... if the font text of a1 is red then mark the cell background colour of T1 red - if a2 text colour is red then mark the cell T2 red .... etc etc.

If the font colour in a1 or a2 ... etc etc is any other colour then do nothing.

I have 5 columns I wish to look down and mark in 5 seperate columns - I have tried to do this by conditional formating but don't know the fomula for checking font colour.

View 9 Replies View Related

Color Only Even Rows

Aug 31, 2006

how you make the following happen in excel using VBA: I want to make all the even rows a different colour (light grey) all the way down the sheet, so row 2, 4 , 6 etc. I want to leave the odd rows normal.

Ideally I would like the vba to work out the last row and stop there. My sheet is called 'Final Rep'

View 9 Replies View Related

Color Blank Rows

Aug 16, 2008

I have a worksheet that contains column A7 through M7. Row 7 contains the header. Currently I have a small vba procedure that inserts a blank row whenever the data in column G7 changes. Here is the code that does this.

View 14 Replies View Related

Find Rows By Color

Jul 14, 2009

I'd like a macro to do this

Put the word "Yes" in the "Red" column if any cell in that row is cell (except the header row).

This was not done via conditional formatting. These red cells are the result of many different subs, so modifying these existing subs would not work as I wouldn't know where to begin modifying each one........

View 14 Replies View Related

Changing Color Of Rows

Mar 14, 2008

I have a spreadsheet where you can choose one of two options per row.

The listbox says either CASH or CHECK. If the user selects CASH, I would like the row to stay the same color. If the user selects CHECK I would like the row to be highlighted or change color. Upon a glance, anyone who knew the system could then tell how many people paid by CHECK, and who they were.

View 9 Replies View Related

Color Alternating Rows

Nov 29, 2006

to tint/color alternating rows with white on my worksheet so when new rows are entered the sheet will adjust maintaining this pattern

View 6 Replies View Related

How To Automatically Color Highlight The Rows

Apr 1, 2014

I am working on a very long worksheet and creating a macro to automatically highlight the row that I am working on

Ex: If I am on row 2 I can use a shortcut to highlight it in blue when I am done working on it I can use another short cut to remove the highlight

Or if I am working on row 5 and 6 I can highlight 2rows or more but still able to remove the color after.

I am wondering if I can have different shortcuts for color blue, green and yellow and another shortcut for removing it.

View 6 Replies View Related

Auto Color Shading Of Rows

Oct 24, 2005

Can I automate an excel worksheet such that if ,say, "436" is written in a
certain cell it shades that row yellow, or if "437" is in that cell it
shades the row blue. It would then be easy to visually tell in an excel
chart which lines belonged to ,say, specific companies.

View 9 Replies View Related

Alternating Color For Groups Of Rows

Aug 1, 2014

My spreadsheet has rows with inspection numbers in column A, but there are varying numbers of rows associated with an inspection number. I'd like to change the color of the rows for every other inspection number to yellow using a formula. I think it has to involve an if/then statement but I can't figure out how to word the formula to just choose every other group of inspection numbers.

Example:
inspection numbers
date
description

[Code].....

View 5 Replies View Related

Cut And Paste Rows Based On Color

Dec 21, 2009

I have an excel sheet with over 10,000 rows. Some of the rows are colored. (Light Green). I want a macro which starts from 1st colored row, cut or copy all the rows (including the colored row) before next colored row comes and paste it in the same workbook but different tab. It would also be good if macro creates the tab itself.

View 9 Replies View Related

Fill Alternate Rows With A Color

Jul 18, 2006

is there any easy way to fill alternate rows of a worksheet with a particular color? I have a worksheet with 175 rows and alternate rows are to be filled with green!

View 4 Replies View Related

Color Rows Based On Row Citeria

Nov 29, 2006

I have a range of data 9cols x 600rows which I want to apply 9 conditional formatting styles to. The range has other data in subsequent columns that I don't want the formatting applied to.

The condition is quite straight-forward, but I'm damned if I can find out how to do it. Only a single cell on any given row will contain data (it's a error if there's more than one value on the row). Based on the column the data is located in, I'd like to assign a background colour to the segment of the row being analysed.

Diagramatically (where * = blank)

Data (Action)
* * * * * * X * * (Colour this row segment some colour)
* X * * * * * * * (Colour this row segment another colour)
* * * X * * * * * (Colour this row segment another colour)
* * * * * * * * * (Colour this row segment another colour)
X * * * * * * * * (Colour this row segment another colour)
X * * * * * * * X (Colour this row segment red - error)

This is as far as I've got and it's not working.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
Dim cell As Range

View 9 Replies View Related

Hide Rows Based On Color

Apr 4, 2008

I have the following code to hide rows based upon whether or not the cell in column A is black or not.

Sub hide_black()

Dim Rng As Range
Dim MyCell As Range
Set Rng = Range("A2:A36635")
For Each MyCell In Rng
If MyCell.Interior.ColorIndex = 1 Then
MyCell.EntireRow.Hidden = True
End If
Next MyCell
End Sub

I was thinking of taking this one step further and having the rows hide automatically once the cell is turned black allowing the user to bypass having to click on a macro button.

View 6 Replies View Related

Remove/Delete Rows By Color

May 7, 2008

I have a spreadsheet with multiple colored rows (grey rows are company headers, white rows are orders). I would like to find and delete any multiple company headers (i.e. grey rows followed by another grey row) and keep only the company headers that have orders (i.e. grey rows follwed by white rows). I have attempted the following macro but it doesn't seem to be validating the initial "If" since I keep receiving my "no good" ...

View 3 Replies View Related

Hiding Rows That Have No Fill Color In Any Of Columns?

Apr 15, 2014

I have a pivot table full of data that needs a macro/vba/something to loop through it and hide all rows that have no fill color. The table had 210 rows so I want a quick way of hiding the irrelevant ones (only the ones filled in green or red), and so all the ones with no fill need to be hidden. Something like a button to hide/unhode would be ideal.

View 4 Replies View Related

How To Fill Color For Multiple Rows And Columns

May 21, 2014

I want to write a macro to fill color in row 8 of the worksheet as solid black . Also columns P,T,AP,BC ,BE and BG should be filled solid black and width should be 1 for the row and the column.

View 7 Replies View Related

Delete Rows Based On Fill Color

Aug 21, 2008

i found a link to my problem in the subject title below,

http://www.ozgrid.com/forum/showthre...t=45580&page=2

The guy at the end of the post says he got it working in the end, but no one seems to have posted the final solution - could someone tell me if the solution is actually in the thread, and if so where!

My problem is outlined by this guy - basically i want to be able to delete rows in a range that have no fill color, and so keep the ones that are colored.

View 9 Replies View Related

Hide Blank Rows - Non Text/color

Dec 28, 2009

I received this code which hides blank rows within a range.

View 12 Replies View Related

Filter Rows Based On Background Color

Oct 27, 2008

how to filter rows based on the background color used in a cell? I need to make a macro that will filter/hide all rows where the cell in column B has the background color set to Yellow. Is there a way to test for that so I could get a true/false value in a column to filter by?

View 9 Replies View Related

Automatically Color Rows Based On Cell Value

Dec 10, 2007

I currently use spreadsheets to report on backup processes.

I am trying to speed up this process and one thing that woudl help me is a function that will automatically fill the row with a colour depending on the choice in the dropdown box, so if you choose 'successful' from the dropdown list the row colour would fill to green and if you select 'failed', the row would change to red and a choice of 'completed/errors' would result in orange.

This process is currently done manually and often results in errors like a succesful result with a red filling.

Is there anyway to automate this process? i was trying to whip up a macro, but have been unsuccessful so far.

View 9 Replies View Related

Color Rows Where To/From Row Numbers Reside In 2 TextBoxes

Apr 25, 2008

I am currently trying to make some VB code that will allow me to offset and select cells depending on a couple of variables.

I have a UserForm that requires two numbers from the user. These numbers will correspond with the cells I want to highlight (the strings from the TextBoxes in the UserForm are called 'test1' and 'test2' in the code shown below)

Dim test1 As String
Dim test2 As String

Private Sub CommandButton1_Click()
test1 = Roww1.Text
test2 = Roww2.Text

Worksheets("Sheet2").Range("A1").Value = test1
Worksheets("Sheet2").Range("B1").Value = test2

When this script is run, I want to end up with some selected cells in sheet1 that match up with the numbers the user enters into the UserForm.

View 8 Replies View Related

Color Rows Based On Cells Being Greater Than/Less Than X

Jun 4, 2008

I have a sheet contains information about employees absence:

- Staff number
- Staff name
- Date of Leave
- Date of Return
- Number of Days Lost

View 9 Replies View Related

Color Fill Multiple Rows Based On Condition

Mar 22, 2007

Is there a way to color fill an entire row based on a value in a certain column? Say I have a large file and one column is "yes" or "no" If I wanted all of the "yes" rows to be colored -

View 5 Replies View Related

Color Rows For All Cells In 1 Column Meeting Condition

Oct 26, 2007

A friend is trying to change an entire row's color based on a specific cell's value in that row. He cannot use conditional formatting. This is the code he's tried, to no avail:

Sub temp()
totalrows = ActiveSheet.UsedRange.Rows.Count
For Row = totalrows To 2 Step -1
If Cells(Row, 25).Value = 4 Then
Rows(Row).Select
Selection.Font.ColorIndex = 3
End If
Next Row
End Sub

View 2 Replies View Related

Delete Columns And Rows Based On Cell Fill Color

Jan 31, 2014

I am a locksmith and attempting to write a spreadsheet app. for my line of work. The output page will use columns A-G and rows 1-?10000? depending on the size of the system. If a 5 pin system is requested then columns A+B will be blacked out. 6 pin system A is blacked out. 7 pin system nothing blacked out. Also, if any cell matches the master key that was input, that cell is filled with red. I know, confusing.

Basically, I am trying to remove the blacked out columns automatically, and to remove the enitire row is any cell in that row is filled with red. Then to remove blank lines.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved