Highlight Row Certain Color Based On Character From Cell?

May 11, 2013

INVENTORY-TRACKER.xlsx

I have a attached an inventory spreadsheet that I use at work. The only active column that gets data entered into it, is column E "Qty (Pcs)". I enter quantities of inventory in this column.

In column B is the part numbers for product. The letters at the end of the part numbers are associated with certain colors that you can see in the small chart to the right of the report. H=Yellow, M=Blue, S=Green, V=Orange and P=Purple.

What I am trying to achieve is when I type a value in the Qty (Pcs) row. I would love for the entire row that contains data to highlight in the respective color based on what letter is at the end of the part number in column B.

Example - I type 100 in E2 and the entire row of data turns Orange because the V at the end of 13001 is associated with Orange.

View 3 Replies


ADVERTISEMENT

Highlight Or Change The Color Of A Cell Based On The Date

May 10, 2007

I looked around at some date functions and could not find one to work.

I have a sheet that has 365 days. When I load the sheet I want to cell for today to be highlighted in some way..... color or just active.

If date = 05-10-2007 then
BackgroundColor = 17
else
BackgroundColor = 9
end if

View 9 Replies View Related

Conditional Formatting - Highlight Cell Containing Specific Character Within Text

Jul 26, 2013

I have an excel spread sheet & I wish to highlight any cell that contains any of the following characters with in a string of text.

/ : * " < > ? |

E.g. a cell in the spread sheet containing the text "Is this a Question?" would be highlighted.

I have tried to use - 'Format only cells that contain' > Specific Text > Containing > for each of the characters and this does not work.

When I do this any cell containing any text is highlighted.

In addition there is formatting on any cell > 60 characters which turns the cell red and this works fine.

What would happen if (when I get the problem above resolved), a cell is > than 60 characters & contains a character listed above?

Does 1 formatting take precedent over another?

(Not critical to know the answer to the additional question, just curious - as long as it is highlighted one colour or another then no problem.)

View 3 Replies View Related

Color Cell If First Character Meets Condition

Aug 4, 2007

I currently have a report that I have code on that will change the color of a cell based on whats in the cell.( Code posted below) However I also need to look at $J and if the first letter of the value in that column is a "z" then I would like to change that whole row to icolor 13 (purple).

For example J14 might be "Z-Thomas". if it does I would like that row 14 to change to purple.

Also I would prefer that the solution be in VB, so that we do not have to do something in VB with the fix below AND do something in Conditional Formatting.

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

If Not Intersect(Target, Range("$A:$E")) Is Nothing Then
Select Case Target
Case "y", "Y"
icolor = 4
Case "n", "N"
icolor = 3
Case "?"
icolor = 6

View 9 Replies View Related

Highlight Given Color On Left Cell Of Dropdown List?

Mar 19, 2012

Column B contains dropdown list with 7 items in it. When an item is selected from the dropdown list I would like to highlight cell in the column A of the same row. Different color needs to be highlighted for every items.

View 1 Replies View Related

Changing Search Result Cell Highlight Color?

May 10, 2013

When I do a SEARCH operation to find the number 10 among hundreds of cells containing data, I'm often finding the way Excel highlights the cell that meets the search result is not easy enough to see.

Is there anyway I could setup Excel so that the resulting cell that meets the search result is highlighted in a RED border or RED Fill? I would like the cell that meets the search result to scream at me with a color highlight that is not easy to miss.

View 3 Replies View Related

Conditional Formatting - Highlight Color Of Text In Particular Cell Depending On Value

Dec 22, 2013

I would like to know the formula to highlight the color of text in particular cell if the value of the particular cell ( value is text ) is so and so.

For Ex: If the J6 is "Vacation" then the J1 text should be in red color.

View 5 Replies View Related

Conditional Formatting - Cell Color Based On Range Of Cell Color

Aug 9, 2013

Summary of performance of various products against target is as follows,

Product vs Target
Color Code
Result

CH4OH
Green
1.0

[Code] ........

I need the final result automated as follows,

If 2 green of the 4 products, then final result Gree
If 2 Amber of the 4 products, then final result amber
If 2 Red of the 4 products, final result Red

Is there a way to automate this?

View 8 Replies View Related

Color Cell Fonts Based On Text Color Of TextBox Controls On UserForm

Apr 11, 2008

I have got a userform with lots of controls,

One of the action's on a large group of the controls is the same but except for one number

here is an example

If TextBox107.ForeColor = 255 Then ActiveCell. Offset(0, 53).Font.ColorIndex = 3
If TextBox108.ForeColor = 255 Then ActiveCell.Offset(0, 54).Font.ColorIndex = 3
If TextBox109.ForeColor = 255 Then ActiveCell.Offset(0, 55).Font.ColorIndex = 3

This makes a cell that correlates to the textbox red if the text in the textbox is red.

Now, I loads of these textboxes that all need to run the same code with just the Offset value one digit higher than the last and I was hoping I could create a loop to avoid a huge block of code but I can't work out how to make a constant that will +1 with each loop.

Also, can I assume that a loop will start with the control with the lowest number i.e. Textbox1 and then work its way through the rest of them in order?

View 3 Replies View Related

Setting Color Of Range Based On Adjacent Cell Color

Nov 1, 2009

This is probably elementary, but I'm struggling and would appreciate any help as I have very little excel VBA experience to draw from.

I have assembled code which changes the cell color based on a value change in Column A. Column A will contain many different groups of repeating values. This code works well and and I have been able to figure out how to limit the number of colors to only 2. The end result is each set of similar values in column A is visually grouped by one of two alternating colors.

The number rows in the data set is variable as the data set is extracted from SAP. The number of columns is fixed.

What I want to do now is set the cell color in columns B through F the same color that was assigned to the row in column A. So if cell A3 is set to colorindex = 6, then I want to set the range of cells B3 to E3 to the same color.

Here is the code I am using to set the color of the cells in Column A:

View 7 Replies View Related

Change Font Color Based On Adjacent Cell Color

Apr 18, 2008

I have two columns. The first one (A) contains cells that have different Fill colors. The second column (B) contains text adjacent to the colored cells. I am trying to change the color of the text in the second column (B) to the corresponding color in the adjacent cell in the first column (A). I don't think conditional formating works well in this situation. I believe the solution would be some sort of macro.

View 3 Replies View Related

Change Text Color Based On Cell Color

Oct 17, 2006

I have various row cells in column (F) filled with the color Green. And corresponding text in Column G. How can I change the text of that particular row to white.

i.e.: if any cell in column F is Green, change the text color of that row in Column G to white?

View 5 Replies View Related

Color Cells Based On Color Of Preceeding Cell

Nov 18, 2007

I am looking for a very simple script that will achieve the following:

On the clicking of a button, Select and shade in a cell yellow, delete the yellow shading of the previous cell. The shading & selection should move up a column of cells, 1 at a time, in the following order:

From B10 to B9, then B9 to B8, B8 to B7 etc until the selection and shading is at B2. Once it is at B2 subsequent clicks will simply keep it at B2 (the top). Thus after 8 clicks the shading & selection should travel from B10 to B2, with only 1 cell being shaded yellow and selected at any one time.

View 5 Replies View Related

Break Contents Of A Cell Based On Character?

Dec 18, 2013

We do large loads of new part #'s/descriptions/UPC's/etc from excel into our database. The fields are limited on character count and I would like writing a formula to break the contents of a cell based on character count without breaking a word.

Examples

Column A Current Data
Row1: 12Pt HD Offset Striking Wrench 1-3/8" & 35MM (44 characters)
Row2: 12Pt 1/2" Drv Socket 27MM (25 characters)
Row3: 12Pt Satin Combo Wrench 11/16" (30 characters)
Row4: 12Pt 1/2" Drv Deep Socket 1-1/8" (32 characters)

Results I'm Looking For

Row1: Column B-12Pt HD Offset Striking Wrench Column C- 1-3/8" & 35MM
Row2: Column B-12Pt 1/2" Drv Socket 27MM Column C-No Data Returned
Row3: Column B-12Pt Satin Combo Wrench 11/16" Column C-No Data Returned
Row4: Column B-12Pt 1/2" Drv Deep Socket Column C-1-1/8"

View 8 Replies View Related

Splitting Cell Contents Based On Character

Mar 22, 2012

I need a formula that splits a cells contents based on a character. Example:

LEATHER GLOVES PAIRS - LARGE PART#4000-0501

I want a forumla that returns everything right of the #. the number of charters changes so i need to reference the #

View 6 Replies View Related

Highlight Entire Row When Cell Selected Without Losing Original Formats And Color Of Original Row

Sep 5, 2012

The problem is when I highlight a row with some color the original color of the row is gone, so I tried this code, and again, it's removing the original format and color for the row This is the code from McGimpsey & Associates : Excel : Highlight row with background colors

Code:
PrivateSub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Const cnNUMCOLS AsLong=256
Const cnHIGHLIGHTCOLOR AsLong=36'default lt. yellow
Static rOld As Range
Static nColorIndices(1To cnNUMCOLS)AsLong
Dim i AsLong
IfNot rOld IsNothingThen'Restore color indices

[code].....

How can I retain the range's historical color so that when I deselect the row it reverts properly?

View 4 Replies View Related

Determine Character Font Color

Feb 5, 2008

I am trying to create a loop that will check the characters in each cell of a specified range and add that cell to a range object if the first or the last character in the cell is a specified color (red in this case). I am using the code listed below, which seems to work to a point. The problem is that the "Union" function does not appear to be working after the first two cells are added. Am I using this function incorrectly?

With curSheet
For Each c In .Range("R1:R50").Cells
charCnt = c.Characters.Count
If c.Characters(1, 1).Font.ColorIndex = 3 Or _
c.Characters(charCnt, 1).Font.ColorIndex = 3 Then
If redCells Is Nothing Then
Set redCells = c
Else
Set redCells = Union(redCells, c)
End If
End If
Next
End With

View 3 Replies View Related

Highlight A Row Based On A Cell

May 15, 2007

I have a macro that already works well but I need to make a change to it and I can't figure out how to do it.

I need so when the macro is run it will prompt the user for a date. After they enter the date it will highlight cells A:K on each row that data appers.

A little background for this. It is a schedule for a call centre which can show two to three weeks of schedules per agent. We rerun the macro each day to update break times and I would like it so it will highlight todays line.

View 14 Replies View Related

How Do I Highlight A Cell Based On Conditions Of Another?

Aug 5, 2009

I want to highlight A1 red if C1 is greater than 55. Is this possible?

View 3 Replies View Related

Highlight Entire Row Based On Cell Value

Aug 13, 2009

From what I understand this is a simple process but since I am new to programming and I am in need of help. I am trying to write into one of my macros that as it is searching in the sheet if it finds CRL in column C and if it finds a value between -1 and 100,000 in column K, then it will highlight the entire row green.What can I do to add this into my macro?

View 14 Replies View Related

How To Highlight Data Based On Another Cell In Same Row

Jan 27, 2014

How can I highlight data based on another cell in the same row?

Ex. I only want to Select data in Column C only if Column B = Rm2

A B C D
1 Bob Rm1 x 0
2 Jack Rm1 x 0
3 Dean Rm2 n 0
4 John Rm2 n 0
5 Barb Rm3 x 0

View 3 Replies View Related

Highlight Cell Based On 2 OR Conditions

May 15, 2008

I am seeking assistance with code for column H to be highlighted when I have a value of "Pending" or "Work In Progress" is present in column E?

View 3 Replies View Related

Macro That Will Highlight Cell And Four Rows To Right Based On Text In Cell

Aug 6, 2014

I have a spreadsheet where if Cell A2 says "Deposit", Rows A2-E2 would be formatted with a Blue background.

I've tried conditional formatting, but I can't built it into a Macro (I can't make it run), and it only highlights the cell that has that value. I also tried having the spreadsheet filter down to only the values I want highlighted, then highlighting all cells and un-filtering the column- this didn't work either.

It would basically say :

If (any cell in Row A) has text = "Deposit" (it needs to be exact, it can't be "containing"), set cell with the word "Deposit" and 4 cells to the right as Blue (I'm not picky about the color).

View 10 Replies View Related

Conditional Format - Highlight Cell Based On The Value Of Another?

Jul 24, 2013

Looking to use conditional formatting to highlight a cell based on the value of another.

I.E. Highlight Cell B2 if Cell A3 is 4 or greater.

View 2 Replies View Related

How To Make Row Highlight Based On Given Number In Cell

Nov 10, 2011

How do I make a row highlight based on a given number in a cell...

For example my spreadsheet has a balance column...when the balance shows 0.00 for that line i would like it to hightlight gray

View 1 Replies View Related

Macro To Highlight A Cell Based On Other Cells Value

Aug 31, 2012

I need a macro to highlight a cell based on other cells.

For example:-

1. I wants to highlight A3 in red if all the cells from I3 to Y3 are empty.
2. I wants to highlight A3 in yellow if I3 is filled and J3 is empty
3. I wants to highlight A3 in green if if I3 is filled and J3 is also filled.

Actually I am having a grid which shows all the components of watch like KIt, case, dial , strap,hands.

The A row is purchase order no and then I3 and J3 belongs to KIt means if a po is not then I3 and J3 are empty so A3 is high Lighted in REd and if a po is placed then we put supplier name in I3 and it changes the color to yellow and when a po is confirmed we put confirmation date in J3 so A3 turns to green.

So in this way we can see if any Po is not yet placed or not yet confirmed based on cell color.

View 9 Replies View Related

Highlight Part Of Cell Based On Input

Oct 5, 2006

I want to track winning football teams by highlighting the victor. So lets say I have a cell that contains

Raiders @ Niners

and another cell containing "home" or "away" indicating the winner.

Based on the home/away cell, I want to either highlight Niners/Raiders.

View 4 Replies View Related

Highlight Cell Based On Value Falling Between Certain Range In Another Cell?

Feb 1, 2012

Let's assume Cell A2, A3, A4, etc, only contain names/text.

Then let's assume I have set up cell B2, B3, B4, etc, to contain a percentage value based on a formula and some other entries I have made.

It should be simple, but I'm having trouble - how do I set up A2, A3, A4, etc, to highlight into different colours based on Column B's data/percentage falling into a certain range?

ie: - if B2 is between 0% - 25%, then highlight A2 green
- if B2 is between 26% - 50%, then highlight A2 orange
- if B2 is between 51% - 100%, then highlight A2 red

View 2 Replies View Related

Conditional Format To Highlight Cell Based On Corresponding Date

Jul 24, 2013

Not very good at this but I have the basic sheet attached. All I want is a way to highlight the first cell when the date is within 30 days of the "Due date".

Calibration Record-example.xls

View 4 Replies View Related

Highlight Cells Based On Cell Reference On Another Worksheet

May 27, 2014

I am trying to find a way to automatically highlight all the cells specified by the cell references in a column on another worksheet (which will constantly have new values added).

On the attached sample, the 'Data Before' tab shows the base data before any highlighting. As cell references are added to the 'References' tab in 'column A' I want the respective cell to be highlighted on the 'Data Before' tab resulting in the 'Data After' tab and each time a new cell reference is added to the 'References' tab, the respective cell is then highlighted on the 'Data Before' tab.

I would like to have control over the highlight colour so that a different highlight colour can be specified for each date change, i.e. all cell references that are shown on the same date are the same colour but where the date changes a different highlight colour can be specified.

Highlight by Cell Reference.xlsx‎

View 9 Replies View Related







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