Macro For Coloring Cells Based On Other Values

Apr 15, 2014

I have two columns, A and B (I technically have a lot more in my sheet but to make it simple just focus on these two columns). The two columns are Company Name and then Company Color. I want to write a macro that based on what color is in Company Code (B1:B500) to highlight Company Name (Column A) based on those values in column B.

Below is an example:

I would want GE to be Red for example.

Company Name
Company Color
Google
White
GE

[Code]...

View 3 Replies


ADVERTISEMENT

Coloring Specific Cells By Values

Jan 16, 2010

I'm new here and not really that familiar with excel functions and programming so please forgive me if this is not the right place for my thread

I am wondering how (if possible) I can make this little scenario work:

Lets say I have

cell (A1) with the value 2
cell (B1) with the value 3

Now somewhere else I wish to color some cell to create a 2 by 3 "block".

So coloring 2 cells horizontically (the value of (A1) and 3 cells Vertically (value of (B1)

View 12 Replies View Related

Coloring Cell Based Off Of Other Cells Date

May 21, 2008

I am trying to make a certain cell range turn red on the week that a cell has listed.

What this is being used for is to track the work of our contractors, and I currently have this set up to auto calculate the jobs that are being done and when, but I would also like to include something in there that when the contractor is set to head back to India, that day forward is listed as "red" under his name. This will allow me to see if I need to extend his work based on the number of hours he has left in his jobs. I will attach the picture of it...on the top you will see dates, and the pivot table on the bottom shows when he will need new work, but I am going to add a field that has the date he is set to leave, this is what I want the coloring of fields to go off of! ...

View 9 Replies View Related

Coloring Multiple Cells Of Excel Sheet Based On Value Of Particular Cell

Nov 27, 2012

I've an excel sheet...where I want to color the cells on the basis of following condition:

If Cell E is non-empty then cell A, Cell B, Cell C, Cell D, Cell F, Cell G, Cell H and Cell I can not be empty. If any one of the cell is found empty then color the respective cell in red!!If collectively all the cells Cell A, Cell B, Cell C, Cell D, Cell F, Cell G, Cell H and Cell I contains a value and Cell E is empty then highlight the Cell E in red color.

I want to implement this in module section...

View 2 Replies View Related

Coloring Percentage Values

Oct 7, 2008

I need to coloring percentage values in excel 2000. What I would like to do is have percentages greater than zero shown in green, while negative values are red, and zero values are black. I currently have the custom formatting so negative values are red and all others are black, but I cant' seem to find a way to change it so greater than zero numbers are green and zeros are black. All I can do is chang positive and zero at the same time. Here is what I currently have:

View 3 Replies View Related

Coloring Cell Based On Condition

Jan 18, 2009

I had an report and the rows of the report needs to be colored based on another cell value. My layout looks like this:

A1B1C1D1AVG
1011121330
14151617100
18192021400

For each cell, i need to compare the value of cell with that value in AVG coloumn and if condition is met, cell should be colored. Eg : If first cell value under A1 is Less than 0.2 * AVG of first row then color of the cell A2 should be red. After coloring the entire rows, then i should check and color the header row based on the color of Rows.

I tried first one, i,e coloring the rows based on conditional formatting and then written VB code to compare the color of rows and colored the header row. But the color index used in conditional formatting and the code are mismatching and the desired output is not coming.So decided to write code for coloring the rows cell.

View 4 Replies View Related

Coloring The Cells

Jan 16, 2007

I had this question earlier and I dont know if it just isnt a regularly answered section so I though i would ask it here.....better yet I will just link to the other page so you can see whats up. Hopefully i will get a few more hits on it in this thread.

http://www.excelforum.com/excel-charting/586210-how-to-color-a-range-of-cells-if-one-has-data-entered.html

View 14 Replies View Related

Coloring Entire Rows Based On Certain Logic

Aug 1, 2014

Here is my attachment with data in first sheet and expected output in second sheet. Have given comments in second sheet for better understanding.

Data is of a debt collection, in sheet column F "form #" denotes loan form numbers and column L "paid" denotes the amount received or not received.

In this Form # are unique and form number will repeat with different paid amount.

Entire row to be colored based on the sum value of paid column amount of respective form number.

1. non repeated single form number with negative value of paid - Orange color

2. repeated form numbers with sum of values in paid column as positive value - only entire row of form number with negative value in blue color

3. repeated form numbers with sum of values in paid column as negative value - first form number row to be colored with yellow and rest of repeated form numbers with purple color and its sum value (negative value should be made available in yellow line of the Form # group to the right of right most column data)

4. form numbers and paid column of value "0" - pink color

I tried recording and edited macro only for the logic of paid value "0" and confused with other logics and declaring variables...

View 9 Replies View Related

Chart Coloring Based On Data Range

Sep 16, 2006

I need this chart to show 3 bar colors based upon values from b5:b14 (data column). This chart is based upon the last 10 draws, so since there are 3 positions, the hit frequency expectancy would be (10 draws/3 positions = 3.33 rounded to 3). So now I would like my bar graph colors RED for any values above "3" in b5:b14 (data column), GREEN for any values equal to "3" in b5:b14 (data column) and BLUE for any values below "3" in b5:b14 (data column).

Attached is a sample chart

View 9 Replies View Related

Coloring Cells After New Input

Feb 4, 2007

I have an input in a cell, let's say: 8:50.

Is it possible to change the color of that cell in red if the text changes in
9:00 for example.

View 13 Replies View Related

Coloring Cells Using An IF Function?

May 10, 2009

Cells in column B need to be colored red if they are equal to 50% of the cells in column C in the same row, or if the cell in column C in the same row is 100.

View 5 Replies View Related

Coloring Cells By Conditions?

Nov 13, 2011

With a range of cells (a1:ao41) I want to color several cells depending on the value of that particular cell and another color when that particular and a corresponding cell have both the same value. It's some sort of sociogram The first row and column both contains names of students. Let say the students have to choose the three most populair ones to work with and the three most unpopulair ones. Positive ones get the color blue, negative ones get the color yellow. That's easy to do with conditional formatting. But now comes the tricky part. If for instance Student 3 chooses Student 7 and Student 7 chooses Student 3 the color of both cells have to be green if both positive and red if both negative. That's also do-able with conditional formatting, but it most be much easier to do with VBA. I just don't know how .

View 5 Replies View Related

Coloring Cells For Times

Feb 8, 2008

I have reviewed many a thread today looking up how to color in cells c11 through c20 without conditional formating.

if these cells have a time less than 01:00 then they turn green
if these cells have a time greater than 01:00 then they turn red
if the time is equal to 01:00 then they turn white.

View 9 Replies View Related

Generating Values In Number Of Cells Based On Adjacent Cell Values

May 22, 2014

What I have In Column B, I have the datesIn Column I, I have engineers name What I need I want a macro to generate Serial Nos. (1,2,3....... n) in column A If an only if the date in column B is today's date and the engineer's name matches with the PC's username

The following is my code

[Code] ....

Above code runs without errors but does nothing.

View 4 Replies View Related

Sum The Values In Cells Based On The Values Other Column

Apr 25, 2006

I want to sum the values in cells E2:P110 based on the values column D. The
values in D are formulas resulting in something that appears to match D112 in
some cases. I'm using the following equation:

=SUMIF(D2:D110,D112,E2:P110)

My problem is that D2 :D10 have a formula in it and it's not matching. If
I enter the result of the formula, all is good. How should I deal with this?

View 11 Replies View Related

Count Unique Cells Based On Ajacent Cells Having Values

Jan 6, 2008

I have the following data in 1 of the tabs.

[TABLE]
ClassSequenceAB
10SE132422
20SE23212
20SE321
20SE23425
10SE332455
15SE132412
10SE234
[/TABLE]

I want a unique count of sequences in a different for that class only if that particular row in 'A' or 'B' is populated. The result set should be as follows:

[TABLE]
ClassAB
1032
1511
2012
[/TABLE]
Can this be achieved through a formula?

View 8 Replies View Related

Summing Up Cells Based On Values Of Other Cells

Oct 25, 2008

I am working on a sheet which calculates payroll. I have a list of people in column A, and in column B, i have their different professionnal status. Their wages vary according to their professionnal status and are in another column C. How can i sum up the wages of only certain people, based on their common professionnal status in column B?

View 3 Replies View Related

Highlighting Cells Based On Cells Values In VBA

Mar 26, 2007

I need to highlight a cell when its value exceeds parameters based on the production line it comes from. If the line is K11, then i need this cell to highlight when its value is either < 0 or greater than 221. If the line is K21, than it needs to highlight when its value is <0 or greater than 474.

View 9 Replies View Related

Macro Paste- Macro To Get The Values From Cells D29 And H24 In The Resource Calculator Sheet

Sep 17, 2009

I need a macro to get the values from cells D29 and H24 in the Resource Calculator sheet and populate it into cells N8 and O8 in the Input form.

Users will then be able to change the information in the calculator and click the macro again to populate N9 and O9 and so on.

Is there a way to do this?

I've attached the file for you to see.

View 13 Replies View Related

Delay Macro (Put In A Statement Within A Macro That Populates Cells With The Values)

Jan 11, 2010

Put in a statement within a Macro that populates cells with the values that I want it to but instead of populating all at the same time, is it possible for the values to be delayed.

I have designed a mock spreadsheet (attached) it has two columns 'Before' and 'After'

After = Before values (in this mock)

When you press the button, the values are populated straight into the 'After column' can we add the delay between the values? So that the values dont come up straight away.

View 3 Replies View Related

If Statement In Macro: Macro To Change A Range Of Cells Colours Based On A Single Cell?

Mar 16, 2007

1st - Need a macro to change a range of cells colours based on a single cell having a value greater than 0.001. ie. cells A1 - G1 need to change to grey based on cell F1 having a value greater than 0.001 entered in it?

2nd - Also a macro for deleting the text contents of cell C1 based on cell F1 having a value greater than 0.001. Therefor if cell F1 has a number greater than 0.001 it changes the colour of celss A1 - G1 and also deletes the text in cell C1?

View 2 Replies View Related

Lookup Based On Values Of Two Cells?

Jan 20, 2014

I would like to lookup and return results based on the values of two cells A1 and B1.

The returned results are from column G to column I and always returned in the same location of the spread sheet.

For example if P2560 is selected in A1 and D10 in cell B1 then after lookup the results would be the values of G3 to I4. Alternatively if A1 is P2560 and B1 is D20, then the results are the values of E5 to I7 and so on.

see the attached spreadsheet for more details. This shows the main data (A2 to I15) and the expected results depending what value is selected for cells A1 and B1.

View 5 Replies View Related

VBA For Hiding Cells Based On Values?

Apr 18, 2014

I'm using the below macros to hide or unhide rows based off of a value in column A. Column A contains an If statement that looks for a value in column F, and depending on whether the corresponding cell in column F contains a value the if statement returns either True or NO-IF(F>0,True,"No).

It currently takes quite a bit of time to run this macro. Given the specs on this machine, I'm convinced that there is probably some loop or inefficiency in my code.

Sub Button1_Click()
Dim cell As Range
For Each cell In Range("a59:A1472")

[Code]....

View 3 Replies View Related

Concatenate Cells Based On Values

Sep 12, 2005

I have a column say column A. It has a pattern of cells where there is a code C10A3(alpha numeric) in say A1 and then in cells A2-A9 there are descriptions (alpha only). This continues uniformally down to cell 300. So every x amt of cells down a code appears and then below this for x cells is a description. What i would like to do is create a macro to concatenate the code waith each of the descriptions and paste it in the adjacent cell to the description. So....

A1 =C10A3
A2 =Global
A3 =America
A4 =South AMERICA
A5 =aFRICA
ETC
A10 =D05a9
A11 =Global

I would like to concatenate A1 and A2 and have the output in B2 (C10A3Global.)
And A1 and A3 with the output in B3 etc. This should continues until A10 (where the cell contains alpha numeric characters) where nothing is entered in B10 and then in B11 there should be D05A9Global....
The only difference between the description and the cell is numeric characters...

View 9 Replies View Related

Formula To Sum Values Based On 2 Cells

Mar 30, 2007

I have three columns of data. I want to give the average sales per person per year but I don't know how to combine two columns in the formula.

ManagerYearSales
Sarah2006200
Sally2006150
Stuart20063000
Steve20064000
Sarah2005100
Sally2005120
Stuart20054500
Steve20055000

I want the output to be something like:

Average Sales Per Year

20052006
Sarahxxxxxxxx
Sallyxxxxxxxx
Stuartxxxxxxxx
Stevexxxxxxxx

For example, I want to give 2006 sales for Sarah.

I know that I could add an extra column to my first table which concatenates the Manager and Year. HOWEVER, In my example it would be fine but in my sales report there is a lot more data with a lot more going on. I don't want to have additional hidden columns that people might stumble upon and change).

I want to use formula and NOT code as other people will be using the sheet and making changes to it. I want them to simply be able to autofill any additional rows rather than me having to update code.

I have attached my example.

View 9 Replies View Related

Macro To Return Data Of Cells Based On Other Cells

Apr 23, 2014

I have a worksheet that I want to populate with specific data from another worksheet.

If all of the following are met:

1) Column A equals "763" and

2) Column K is formatted Red (255, 0, 0) from conditional formatting

3) Column P is blank

Then in my blank worksheet I need to display the data from Columns A, B, D, K, O

View 4 Replies View Related

Run Macro Based On Values In Column

Dec 2, 2007

I am trying to write code that will run a macro based on values in a certain column. I do not know how many rows are present at the time the macro will be run.

For example, if Column A has the number 2 in every row then I want macro Z to run. However, if the values are not the same then I want macro Y to run.

View 8 Replies View Related

Shade Cells Based On 3 Text Values?

Oct 15, 2009

I have one cell (B10) that will contain either "high", "medium", or "low". Based on one of these 3 values, I'd like to shade cell J15 a color with some white text. I got 1 of the 3 keywords working, not sure how to add in the other 2.

View 2 Replies View Related

VBA To Merge Cells Based On Other Column Values?

Mar 19, 2014

Now I know that merging cells is usually not a good thing in VBA, but I'm working on a data report that just looks bad unless longer pieces of text can span several cells to minimize column width.

So here's the problem:

I have a column of 1's and 0's in columns E and F, and text in Column G. I want to merge the cells in columns G and H for that specific row if there is a 1 in either the E or F column for that specific row. And I need to do this for a long range...rows 7-5000. Any ways that VBA can do this?

View 4 Replies View Related

Creating A Gantt Based On Values In Cells

Jul 9, 2008

Based on a Beginning Date Value and an Ending Date Value - I would like to color a range of Cells - the month (dates) are in the header row.

For example: Beginning Date = 01/01/09
Ending Date = 06/01/09

I want the range of cells in the same row colored orange under Jan '09 to June '09.

View 8 Replies View Related







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