# Sum Of Values Depending On Color

Sep 29, 2009

How can i do sum of the values which are in red color

CODEAMTA1B2C3D4E5F6G7H8

## Change Color Of Cell Depending On Values In Another Range

Nov 22, 2007

I want to change the colour of a cell depending on its value, when compared to another row of data identiified by a value in another cell. To try an clarify:

b3 = 1 b5=4 Because b3 = 1 then compare cell b5 with the row g1 as b3=g1 then depending on its postion set a colour

g1= 1 g2:g5 = 2,3,4,5,6
h2= 2 h2:h5 = 7,8,9,10

## Row Color Depending On Cell Value

Sep 3, 2009

I was wondering if it is possible to fill a row with a color depending on the value of a certain cell. Say, if the value of cell N5 is 0 then row 5 turns red.

## Color After Depending On 1st Value In A Cell

Jul 3, 2009

I have another macro request.

I would like to ‘grey out’ a certain qty of cells depending on the 1st number in another cell. So 1st of all it would have to check in column B to see if there is any data and then check for the first number in that cell (there will be many numbers in the cells but we only need the 1st one (Ex.: B3 = “3 / 8 & 8”).

Then it should start counting from column D the found number of cells multiplied by 2.

Ex.: if Cell B3 contains “3 / 8 & 8” it will count 3 x 2 = 6 (3 cells x 2 = 6 cells)

Then, if after that count (now at I3), in the next cell over (J3) if the is data in the cell above (J2) then it should apply an Interior.ColorIndex of 15 for the next cells until there is no data in the cells above (if nothing after K2 the grey will be applied to cells J3 & K3 only).

## Change Color Font Depending In My If Then Else

Jan 29, 2008

I want change color Font depending in my if then else.

I have workbook with several sheets, but i need change colorfont Is that validation is true.

The number are in Sheets("PSDATA").Range("AA")

Private Sub color() .....

## To Change Color Of Cells Depending On Value

Nov 10, 2008

when I execute this code on the selected cells, it completely ignores my selection, and makes the entire worksheet black.

Sub ColorCells()

Dim cell As Range

For Each cell In Selection

If cell.Value = "U" Then
cells.Interior.Color = 3

## Changes The Cell Color Depending On How Many Clicks

Mar 13, 2009

The code changes the cell color depending on how many clicks you give it.
The code it self works fantastic but the problem i have is if i manually unlock the sheet every time i click any where in sheet it locks it again.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo Error
Dim I As Integer, I1 As Integer, ws1 As Worksheet

Set ws1 = Worksheets("36hr Plan")
ws1.Unprotect "muppeticity"

I1 = 40
For I = 5 To 25 Step 5
For I1 = 22 To 204 Step 13
Offset1 = 0
If Not Intersect(Target, ws1.Cells(I1, I)) Is Nothing _
Or Not Intersect(Target, ws1.Cells(I1 + 1, 5)) Is Nothing _
Or Not Intersect(Target, ws1.Cells(I1 + 2, 5)) Is Nothing Then.............

## Highlighting Cell Color Depending On Text

Sep 15, 2014

See attached work book, it is an mot booking system that is all working fine except for one thing that I don't know how to change.

At the moment if you double click a cell in the test type column it enters the required data and turns the cell green highlighting the length of time and values this is all good but I am wanting the ones that start with n-side to turn yellow just so that we can see our own internal tests easily. It is control in the coding not formatting . Is there a way this can be done?

## How To Change Row Color Depending On Future Date

Dec 31, 2013

I have some real estate rental so what I did 7 columns and its includes: name, phone number, ....., contract start date, and contract expiry date.

my question is how to make the row color changes depends on the expiry date

for example, the expiry date is 12/10/2014. I want the the row to be red when 12/10/2014 comes.

## Color Code Cell Depending On Which Name Is Presesnt

Dec 6, 2007

I have an excel spreadsheet where column "D" will have one of fifteen different names inserted. According to which name is present, the cell needs to be a specific color. Any ideas on what would be the best code to use to read the entire column and format the cells that have names?

## Cells' Color Change Depending On Dates

Aug 24, 2009

I have column "C", starting from "C5" with dates till C200, but not all cells have dates some of them are also blank.

I want the cell to change color depending on the date.

If the written due date is in a month from today, I want it to turn yellow, and if the due date is in the past from today, I wanted to turn red. I want it to get updated every month.

## Fill Color Depending On Content Of Other Cell

May 1, 2008

I have a template I have been asked to amend and I know I need to use Conditional Formatting I just can't crack the formula I need to use. Cell A2 will have either "CD" or "CW" or "IN" input into it

When user inputs either "CD" or "CW" into cell A2, I want cell G2 to have "Margin Movement" automatically displayed. When user inputs "IN" into cell A2, I want cell F2 to have "MV" automatically displayed, and I want cell G2 to be coloured in bright red fill. Then user is to go to cell G2 and input some text as a description, and I want the red fill to disappear once they have input something in there.

I thought I had it licked using IF statements for the "Margin Movement" and the "MV" cells, but I can't get the conditional formatting to work - I assume this is because the cells aren't technically "blank", as they have IF statements in them.

## Formula Change Cell Color Depending On Priority

Aug 29, 2012

My colleagues are working on multiple projects at once. The projects got different priority, so I'm looking for a formula that change the cell color if a person is working on it, depending on the project's priority.

For example if John is working on project: East(pri.1), South(pri.2) and West(pri.3). On East he got 5 remaining hours (cell E8). Then i would like that cell to turn red. For South green and West red.

## Cell Color Fill Depending On Condition Of 2 Other Cells

Jun 23, 2009

Afternoon everyone i am having abit of trouble working on an excel 2007 spreadsheet. In cell I1 i have a tab called Color. i want the cells below I1 to be filled with one of 3 colors green, yellow, or red depending on whats in cell F "Status" (closed or open - in progress) and cell G ECD for estimated completion date.

Green - i need it to fill green if status is closed. Yellow - need it to fill yellow if ECD is any date greater than today and if status is open. Red - need it to fill red if ECD is todays date or older and status is open.

## Change Color Of Cells Depending On Data (format) Present In It?

Jan 11, 2013

I need change the color of the cell depending on the following conditions. (By the way the column will have names list)

1. single punctuations are allowed anywhere in name apart from first position.-->color should not change
2. If any name got consecutive punctuations --> color should change to RED.
3. Any punctuations apart from Dot(.), hyphen(-), apostrophe('), Space( ) are not allowed-->color should change to RED.

Example-
ShivakumaraNo Change
Shiva kumaraNo Change
Shiva'kumaraNo Change
shiva.kumaraNo Change
shiva kumarared
shiva''kumarared
shiva' kumarared
shiva. Kumarared
shiva.'kumarared
shiva:kumarared

## 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.

## Userform's Listbox Values Depending On Values On Certain Matrix

Aug 16, 2008

I have problems with my userform's listboxes. I have two listboxes, and I want second listbox's values to be dependent on first listbox's values.

And even more complicated, I need second listbox's values to be dependent on values on certain matrix.

In that matrix, row headings are listbox1's values and column headings are listbox2's values. How ever there are blanc cells on that matrix aswell. So if there is a blanc cell(s) on a row which (heading) is selected at listbox1, then I don't want that column (heading) which intersects with the blanc cell to be included to my listbox2 values.

Finally I want to insert the selected values from listboxes and the value from the intersection of those listbox values (headings) on that matrix to worksheet.

I included an attachment, where you can see my point better. However, as you can see, now the listbox values are not dependent on that matrix. Otherwise it is working like I want it to work.

## Changing Empty Cell Background Color Depending On Different Cell Value

Aug 7, 2014

I'm trying to create a tag with a color border. What I desire is to fill the BLANK cells around the tag, A1:D1 + D1:D19 + A1:D19 + A1:19 in a certain color based on the text value of the cell B11. There are 5 different values, such that if the B11 read Red Sox - the boarder is going to be red, if it reads Houston Astros it will be dark blue, etc..

I have a similar problem with changing the color of the cell based on the month. So regardless of the year, 2014, 2015, 2016, etc... If I use MONTH() function I can just get numbers from 1-12. I want Cell C16-C18 to be certain color depending the date entered in cell C17 such that for each quarter, months 1-3, 4-6, 7-9, 10-12 they are different color.

I have had no luck with conditional formatting (and I also believe that it is good up to 3 cases only). I am decent in logic/programming language but have little knowledge with macro notation and especially how to run them in excel 2013. I do know how to start it alt+F11 and that I need to make sure that code is written under the specific sheet where my tag is located.

## Make A Cell A Color Depending On A Number In A Different Cell?

Sep 26, 2006

how to make a cell a color depending on a number in a different cell? Example...if A2 is 92.6 how would I make D2 blue? But if A2 were 91.9 how would I make D2 red?

## % Calculation With Values Depending On Size..

Jan 12, 2010

There is a data range in the E + G columns. The content of the E column can be 5 different items with variable GROSS weights in the G column:

.........E..........G..........R...........S...........T
1.....Size.....Gross....%.........Net......Size
2.....200 g....138......56.52...20........45 g
3.....100 g.....84....................35......100 g
4......45 g......52....................60......200 g
5.....500 g....253...................124.....500 g
6.....Strip......15.......................7........Strip
7.....100 g.....90
8.....500 g....280
9......45 g......62
10........................

## Excel - Hide Rows Depending On Values

Sep 12, 2013

I have created an excel document with If formulas. If nothing gets entered in that particular row, the row simply says "None". Is there a way to get rid of any row that contains that value by any chance?

Something along the lines of if the row says "None" then that particular row gets automatically hidden? It would probably need to be in VBA?

## Data Validation List Depending On Other Values In Row?

Jun 25, 2014

Example:

Sheet: Users
Column A has "Yes and No"
Column B has "Names"

ex.
A B
Yes Peter Johnson
No Patrick Andersen
Yes John Smith

Now i would like to create a list in sheet [Employee] where one the users with Yes in column A is shown.
In this ex.

Peter Johnson
John Smith

No need to show yes or no.

## Drop Down Lists - Depending On Other Cell Values

Oct 23, 2008

I have a workbook with several drop down boxes and formulas already set up and working. I want to improve it though. My question is.... is there a formula that will make the drop down list change based on a cell value....

For example: If B6 equals vegetables then C6 equals list (potato, carrot, pea, etc.) If B6 equals fruit then C6 equals list (apple, banana, grape)

## Getting Duplicated Values Depending On Rank Order

May 28, 2009

So, I have some names and values. Rank function give me order for those values.
Small function gives me ascending order. I want to get first n (let say 5) values back next to each other but can't use VLOOKUP function because sometimes I get duplicates (red numbers).

If there is more same numbersthat small function returns... It need to give me all of them, no matter 5 is limit. how to get back values of rank function that are duplicated. Book1.xls

## Dropdown List Depending On Previous Values?

Jan 3, 2013

see attached document - this is a stock record sheet. what i want it to do is when Bed is seleceted in column B - i want colum C to show the BedSize list which is in the lists tab. and the same with Chair i want it show ChairSize

## Distribute Values To Cells Depending On The Input Value

Feb 25, 2009

I would like to distribute values in cells depending on the input value (excel file attached). This file is a test and basically i've been entering the data manualy. The format is flexible, so it can be reorganisaed.

## Add Values To 2 Arrays Depending On What Is In Worksheet Table

Jan 4, 2012

I have some arrays to loop through some code which generates some graphs:

Code:
Sub demo()
Dim aServer
Dim aType
Dim i
aServer = Array("a", "b", "c")
aType = Array("1", "2", "3")

[code]....

I am now trying to populate the arrays dynamically and thought I could work that out myself, but this is my first ever time with VBA and it's not as easy as I thought (Or maybe I'm not as clever as I thought!)

I have a table in a worksheet with column headings and row headings which are the values to be added to the array.

Lets say I have the following:

Column headings = "x", "y", "z" (these are the potential aType values)
Row headings= "1", "2", "3" (these are the potential aServer values)
_,x, y, z
1
2
3

The values in the table are either TRUE or FALSE (Or blank which should be interpreted as FALSE). Where there is a TRUE the column heading should be added to the aServer array and the Row heading should be added to the aType array.

In this 9 cell example (Not counting the row and column headings), if the first 2 rows had all the values as TRUE (See example table below) it would therefore result in the following arrays:

_,x, y, z
1,TRUE,TRUE,TRUE
2,TRUE,TRUE,TRUE
3,FALSE,FALSE,FALSE

Code:

aServer = Array("1", "1", "1", "2", "2", "2")
aType = Array("x", "y", "z", "x", "y", "z")

If the table was as follows:

_,x, y, z
1,TRUE,FALSE,FALSE
2,FALSE,FALSE,FALSE
3,FALSE,TRUE,TRUE

It should result in the following arrays:

Code:
aServer = Array("1", "3", "3")
aType = Array("x", "y", "z")

this would work out how many rows and columns there were based on how many column headings and row headings there were (So I wouldn't have to change the hardcoded VBA when the table grows, therefore making it easier to share the spreadsheet with others)

## Count Unique Values Depending On Condition?

Jun 17, 2012

I'm looking to get a formula to counting unique values listed in a column depending on a condition also find the attached file for more details

[URL]

## Send Email Depending On Cell Values

Jan 23, 2004

Does anyone know the code to send an email to a set list of six recipients when cells in a certain column in a worksheet reach a certain value greater than another. Let me explain a little - The action to be performed is date-based.

For Example:

When the date cell L2 is 30 days later than the date in K2, send an email with subject containing data from cells B2 and C3.

However, this has to work for columns K and L in their entirety, as both columns contain a list of dates...

## Lookup Results Depending Upon Cell Values

Aug 25, 2008

Depending upon a figure entered e.g. = \$ 895.00 and also Depending upon a state being entered e.g. = NSW. Then Excel will lookup a series of cells to produce the correct figure depending upon the correct data ciritera being met. I have a data table sitting behind the spreadsheet with all relevant values.