Macro - Color Coding

Jun 13, 2007

I am trying to figure out how to run a macro for 1 particular workbook in an excel spreadsheet. I don't want it run on any of the other workbooks in that file, just the 1. I can't use conditional formatting because I need more than 3 values (if statements).

This is what one example of data in a cell and below is the color I'd like it to turn when I run the macro:

T: 6/1/07
A: 6/8/07

Anything that has a A: (which means an actual date it happened) I'd like the cell to turn blue. If there is an RT: (which means revised target) I'd like the cell to turn red which means it missed it's target date, and has been revised. If it has a TBD I'd like the cell to turn pink (or yellow or any color really). All other cells are just white. I don't know where to find the color codes in excel as well. Other samples of what cells look like are below.

Here is another example:

T: TBD

And final example:

T: 6/4/07
RT: 6/15/07

View 9 Replies


ADVERTISEMENT

Color Coding Formula

May 14, 2007

i'm trying to figure out a formula that if a cell is greater or equal to another cell - color a cell "GREEn"

otherwise...color the cell "red"

View 9 Replies View Related

Color Coding Cells With Vba

Feb 7, 2008

I have a spreadsheet with cells containing different names. I want all of the cells containing the word Volitility to be colored one color, all of the cells with the word Momentum colored another color, and so on. I have more than three names so I cannot use conditional formatting. Attached is a workbook that has the uncolored cells in worksheet 1 and an example of what I want it to end up looking like in worksheet 2.

View 9 Replies View Related

Color Coding Condition Format

May 15, 2007

i'm trying to figure out a conditional formatting that if a cell is greater or equal to another cell - color a cell "GREEn"

otherwise...color the cell "red"

View 7 Replies View Related

Color Coding Cells Based On Data From Another Cell?

Mar 29, 2012

I have a worksheet set up where one column of data (we shall call it "A") is the result of several other columns' calculations (uses a formula referencing other cells). I have an entirely separate cell that also gets its data from other cells (we shall call this "B"). What I'm trying to do is make the shading of column "A" dependent upon data from column "B". For example, if column "B's" value is >24, I want column "A" to shade in red.

View 10 Replies View Related

Automatically Color Coding Based On Cell Contents

Jan 28, 2013

I would like to automatically color the fill of a cell based on the cell contents.

For example, if the cell content is "1" I would like the color of the cell to be cyan and if the cell content is "2" I would like the color the cell to be red.

I've tinkered with several different formulas but I just can't get anything to work.'

View 2 Replies View Related

Apply Color Coding To Dates Based On Conditioning

Aug 1, 2007

Im working on a large workbook with multiple worksheets. Each of these
worksheets has a large amount of data relating to training records. In
particular, the date that an employees certification is due to expire
(eg: 01/02/2007 or 31/09/2009 etc)...(im also in Australia so my date formats may be different).

I need to color code these records with the below logic, eg:

If Cell Date is <Today() = Red Text or Cell
If Cell Date is <18months from Today()+1 = Yellow Text or Cell
If Cell Date is >18months from Today() = No change - leave white

I have basic VBA knowledge, but will be able to work my way through
some of the code that is posted.

It's also key to note that there are multiple 'Blank' and 'Text' Cells
in these worksheets. I only want to apply this code to a cell if it is
populated with a date, is this possible ?? (eg: i only want to change
the color of the dates listed, not the other cells with text and single
numbers).

I have played around with the Conditional Formatting but i will need
more than 3 conditions in the future. I've also attached a small
screenshot of the data for your convenience.

View 14 Replies View Related

Macro Coding: Add A Code To The Sort And Paste Macro That Will Open The Second Spread Sheet

Jul 21, 2007

I am making a spreadsheet that sorts and pastes, but I need to know if I can add a code to the Sort and Paste Macro that will open the second spread sheet needed without just already having it open and using the

Windows("estimate sheet one.xls").Activate

View 2 Replies View Related

Coding A Macro In VBA

Apr 3, 2008

Is there a way of coding a macro in VBA that allows you, with one macro, to enter text in one cell and at the same time enter a value to the cell on it's right?

I don't want to name the cells, but I wondered if you could add to the code a piece of code that basically said "Select the cell to this cell's right and add the value x".

View 9 Replies View Related

How To Change Coding In Macro For Pivot

May 9, 2014

I'm trying to run a pivot in Macro where the Pivot needs to choose the whole sheet and not a specific range as the data pasted in the sheet may fall in different range or rows however the columns are stable.,

Below given is the coding for that Macro Recording for Pivot.

[Code] .......

View 2 Replies View Related

Why Some Macro Coding Put In Sheet And Some Put In Modules

Mar 18, 2014

I would like to know why some macro coding put in sheet and some put in modules?? What the different??

View 6 Replies View Related

Coding For Macro To Open Link?

Oct 29, 2012

Sub FollowLinks()
Dim i As Hyperlink
If (A1) = " http://www.ecb.int/stats/money/aggre...ng_amounts.zip " Then
OpenLinks " http://www.ecb.int/stats/money/aggre...ng_amounts.zip "
End If

End Sub

I'm really stuck, as I only just learnt VBA yesterday. I'd also like the macro to run when you press a button on the keyboard, is there a way to do this?

View 2 Replies View Related

VBA Coding - Macro Moving Data With Multiple Variables?

Jul 17, 2013

I'm working on a complex spreadsheet and I'm working on a complex spreadsheet system for pulling and measuring data. My VB programming skills are about minimal/average, so you may see me on here asking various questions . In any case, what I'm trying to do is create isolation macros for "Kickback" data (erroneous). I'm trying to remove data with certain criteria and isolate it on a separate "kickback" sheet for one for taking a second look at. I've made the easy macro of creating a new spreadsheet:

Sub Create_Kicbacks_Sheet()
' Create_Kicbacks_Sheet Macro
' Creates "Kickbacks" sheet for invalid information.
Sheets.Add After:=Sheets(Sheets.Count)
Sheets("Sheet4").Select
Sheets("Sheet4").Name = "Kickbacks"
Sheets("Kickbacks").Select
End Sub

This coding works correctly. The problem area I'm finding is the sorting data. My goal is to look at Columns A and B for certain criteria and either leave it alone, move it to the "Kickbacks" sheet or delete (due to not being necessary in data calculations). Basically, here's a synopsis of what I'm looking for:

if Column A = Y and Column B = Mandatory -> Leave Alone
if Column A = Y and Column B = Best Efforts -> Move Row to Kickbacks
if Column A = Y and Column B = Empty Cell -> Move Row to Kickbacks
if Column A = Empty Cell and Column B = Mandatory -> Move Row to Kickbacks
if Column A = Empty Cell and Column B = Best Efforts -> Delete Row

Here's the code I have in excel (modified from one I found online)... Which only is doing some of what I want it to do:

Sub Moveto_Kickbacks()
Dim r As Range, LR As Long
With Sheets("Data")
LR = .Range("A" & Rows.Count).End(xlUp).Row
Set r = .Range("A2").Resize(LR - 1)
.Range("A1").AutoFilter field:=1, Criteria1:=""
.Range("B1").AutoFilter field:=2, Criteria1:="Mandatory"

[code]....

View 2 Replies View Related

Public And Private Sub: Move To The Next Curios Level Of Understanding Macro And VB Coding

Jun 29, 2006

Where can I obtain some working examples or explanations as to what, where, when, why, and how these Public and Private Sub are correctly implemented? I see these code used extensively but not sure why it's there yet. A macro which uses a Private Sub is in one of my workbooks. Due the "progress" of things from here I now need to move to the next curios level of understanding Macro and VB coding.

View 3 Replies View Related

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

VBA Coding

Mar 18, 2008

I am trying to code a macro to run down through a column and hide the row if it finds a cetain marker (i.e. the letter "n") in the column, and then move onto the next one.

View 9 Replies View Related

Coding Months

May 22, 2007

My spreadsheet calculates the date on a daily basis.

I would like to create a code in my spreadsheet which uses the year and month in question.

First, 2006 is is designated as a "3"
2007 "4"
2008 "5"
2009 "6" etc

Don't worry about anything prior to 2006.

Next, the months are represented by single digits. So, January = 1, February = 2, March = 3, April =4, etc. September is 9, and October = 10 but all the numbers over 9 have to be reduced to a single digit, so October = 1+0=1, November =1+1= 2, December =1+2= 3.

Now, the formula for the Month is:

Year + current Month

So, May 2007 = 4 + 5 = 9
June 2007 = 4 + 6 = 10 = 1
July 2007 = 4 + 7 = 11 = 2,
January 2008 = 5 + 1 = 6, etc

View 9 Replies View Related

Optimizing Coding

Jun 3, 2008

I have made this vba to go out and look at 2 different locations which contain simular folder names.

The script then writes the folder names in Column A, followed by the Size of both the folders from the 2 locations. The script is comparing the second location folder name to what the first process put in Column A so the folder names will be aligned with the file sizes. It is also converting the file sizes from bytes to the most appropriate one.

The problem I am having here, is once I put the second part in for the second folder, the script is either taking forver (More than an hour) or is freezing. So I am not sure if I put it in a loop somewhere or what exactly is happening. I am just wondering if I can get some help troubleshooting and optimizing this code....

View 9 Replies View Related

Lock Vba Coding

May 1, 2007

How it is possible to lock the VBA coding and Modules? I mean when Some one want to view VBA coding the Password window should not appear, istead of that a message box appears with message something like "Not viewable"

View 9 Replies View Related

Dropdown Box Coding To Another Cell

Dec 24, 2012

I have a drop down box with the 10 different shifts we run here at my work. Ie - Daytime (0700-1500), Nightime (1500-2300) etc. I have these on a drop box as stated earlier (Cell 6) - and want to code a selection from within the box, to effect Cell 7 with the approriate hours worked depending on what I selected in Cell 6.

View 2 Replies View Related

Coding To Order Stock

May 8, 2014

I am looking to create coding that once stock gets to a particular level a text box pops up to alert the user that more stock needs to be ordered and ideally I would like once the user selects ok for it to take them directly to the appropriate email template.

However, I don't want the text box to come up while we are waiting on the stock to be ordered.

i.e our current minimum stock level before placing our next order is 10,000 units. Order is placed and can be received within 10 - 14 days. During this time our 10,000 units will be used but I don't want an alert to pop up to remind the user to place an order as this action will already have been carried out.

View 1 Replies View Related

Dynamic Range In Vba Coding

Nov 2, 2008

I'm trying to write a code which would place formulas in the row just below the my range (normally a matrix of figures) to sum the column in that just above that. Here's what I've got so far but it doesn't work.

View 6 Replies View Related

Coding Multiple Cases In VBA

Mar 24, 2009

I am writing VBA code to do the following:
IF A1 > 50 then print array C1:E7

I have this code and it works.

View 14 Replies View Related

Deactivate Coding Not Working?

Sep 3, 2009

I have placed the following code in my spreadsheet but it's not working!

the code after option explicit (now at the bottom) works, (thanks to Andy on here!) but all the disabling the right click and cut/copy/paste etc doesn't.

View 6 Replies View Related

Coding For Changing Worksheet Name

Oct 26, 2009

when the accounts exported to excel, all the tabs shown in the file are generated. However, i need to change tab '3' to tab '10' name to the name stated in tab 'menu'. eg tab 1 need to be renamed as 'BB' (not BB/Bunut), tab 2 to 'GEN' (not GEN/General), etc. All must be capital letter.

View 5 Replies View Related

Using Index And Match In VBA Coding

Jun 3, 2014

I have table where i have to find a value based on 2 criterias. So i have used in Excel the below formula:

=INDEX($A$1:$D$7,MATCH(1,($A$1:$A$7=$F2)*($B$1:$B$7

View 1 Replies View Related

Can You Use VBA Coding To Sort By More Then 3 Criteria

Nov 28, 2006

I was wondering if there is a workaround for sorting in Excel by MORE THEN 3 CRITERIA?

I have seen a couple of solution doing 2 seperate sorts but was wondering if you can write code to expand on Excels limited sorting capabilities?

View 9 Replies View Related

Vba Coding For A Simple Clock

Sep 15, 2008

where can I get vba coding for a simple clock.

I would like the clock to be digital rather than analogue if possible

View 9 Replies View Related

VBA Or Other Coding For Looking Up File Date

Dec 15, 2008

I am trying to learn how to use it in some of my Excel application. I am just wondering if someone would be willing to help what I am thinking would be a short string of code.

What I have is a list of files that I have compiled along with a name and description in cells B3 and C3 respectively. In cell E3 what I have is the path to that file which is linked so that I can click on it to access the file. Is there any way that I can write some kind of simple code to look up the last modified date of that file whose path is specifed and place it in cell D3.

View 9 Replies View Related







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