I have developed a profit loss sheet for the office I work for. What i need is to have either cells change colour or the numbers in the cell change colour depening on the value in the cell.
What I was thinking is if the number is over 15% of the sale price the cell or number should be green, if the number is under 15% it should be black, and if its below 0% it will be red.
I have a spreadsheet where I can change the colour of a cell by clicking the mouse, I also have text in many of the cells.
What I need to do is protect (lock) the text so that no one can change the text in any of the cells, but I still want to be able to change the colour of the cells by clicking the mouse in that cell.
I am using the following code to amend the colour of a cell when a name is entered in ROW J however, i need it to colour the row from A to O on the line the name is entered on.
So for example Dave is in j2 (j1 is a header) the line from A2 to o2 goes green.
I have tried a few things with interesting results but not get desired result.
How to a change a cell colour to say red in B6 if cell b12 = 1 and if e6 = 1 to change to green. I thought I might be able to use conditional formatiing but no. I had set the spread sheet to do a cell just for a condition representing a sum from another worksheet and it was working fine but i have to incorporate the two together and am stock.
I have a very basic understanding of excel, I mean BASIC, for my work I have multiple dates for vehicles to go in for inspections. I would like the cells to change colours when within 30 days, 10 days and 5 days. I'm on a work excel 2003.
I need to compare 2 worksheets, one containing a list of IP adresses that need to be checked (interfaces), and another containing a list of IP addresses that have been checked (Scanned hosts), there are over 100000 scanned host entries.
I need to search the "Scanned hosts" worksheet to ensure that all of the IP addresses listed in the "Interfaces" worksheet have been scanned. I then need to place an entry next to the IP address on the "interfaces" worksheet to indicate the check date and the name of the person who checked it. It also needs to change the colour of the cells to indicate if it has been found or not found.
The code I have written so far (from piecing together different threads from MrExcel), at first glance, seems to work perfectly. However, if I replace an ip address in the "interfaces" worksheet, with one that I know does not exist - it still marks it as found.
Interfaces; IP Address System Date Checked Checked By
1.2.3.4 fred bloggs
1.2.3.5 fred bloggs
[Code] .....
Scanned hosts is just a list of IP addresses and text (168000 rows) in a single column. Format is xx.xx.xx.xx ^IP^^^^Jul 29 2012 08:01:29:000PM
Sub Compare() Dim X As Long, CurrentRow As Long, FindRow As Long, WS1 As Worksheet, WS2 As Worksheet
Set WS1 = Worksheets("Interfaces") Set WS2 = Worksheets("Scanned Hosts")
Run-Time error '1004': Method 'Range' of object'_worksheet' failed
The Function basically takes any cell in range with a formula and has it blue. If the formula is overwritten by the user it turns the cells colour Red.
Private Sub Worksheet_Change(ByVal Target As Range)
'change Colour of cells from blue if formula based to red if data typed by user
If Not Intersect(Target, Range("AS63,BA5:BP66,BT7:CI55,BU60:BU64,BX60:BX64,CA60:CA64,CD60:CD64,BT55:CI66,BT59:CI59,CF7:CF55,CF65:CF66,DJ19:DJ21,DJ24,DL5:DM36,DJ41,DJ45,DJ48,DL41:DM48,DH50:DH51,DJ50:DJ51,DL50:DM53,DH63,DJ63,DL55:DM58,DL60:DM66,DU5:DV33,DU37:DV58,DZ8:EB8,ED5:EE27,ED31:EE66,EM5:EN12,EM16:EN29,EM33:EN38,DH63,AL5:AM26,AL30:AM49,AL53:AM66,AV5:AW16,AV20:AW29,AV33:AW53,AV55:AW63,CO5:CO66,CQ5:CR66,CY5:CY66,DA5:DB66,DJ5:DJ7,DJ14:DJ15,DJ17")) Is Nothing Then If Target.HasFormula Then Target.Font.ColorIndex = 11 Else Target.Font.ColorIndex = 3 End If End If End Sub
I have a worksheey of data and i would like the tab to be a certain colour dependant on the the contents of a range of cells within that worksheet is that possible. i know i need to use VBA and it cna be done based ont he contents of one cell.
So for example i have a sheet of people i am awaiting payment from, based on the last column " bill paid" i want the tab to be Red if there are any blanks in this column/ range and go green when all the cells in the column/ range are filled with "y"
How to colour cells depending on text in other cells, for example,
I would like cells D26:AA26 to turn light red if the letters 'FSM' are in cell 'E26' even if other text appears in it, eg 'SA+/FSM' I have been playing about with conditional formatting but can seem to solve the mixed text issue?
What would be the quickest and most efficient way of doing the following:
Example
Sheet 1: clicking once, twice, three times in the following cells to change the fill to Red, Yellow, Green respectively (in Row 22, COLUMNS E H K N Q T W Z AD AG) and mirrorring this format/fill on:
Sheet 2: , mirror the selected fill on sheet1 in E22, H22 , K22 in in E3:N3 respectively example E22 (sheet1) is mirrored now in E3 (sheet 2); H22 (sheet 1) is mirrored in F3 (sheet2) etc etc.
I have 35 tabs formatted in the same way - each tab, as with Sheet 1 is linked to a different row on sheet 2 in the same range as is sheet 1 and would need to replicate the mirorring on Sheet 1 to each of the other 34 tabs.
I am working on a spreadsheet for work, and have managed to do everything I need to so far but I need to colour specific letter strings, certain colours within a range of cells (each letter string will only appear once on each sheet)
The strings I will be looking for vary depending on data entered so I will need to cell reference them
The strings that need colouring are in cells with other strings that must stay black (They cannot be separated from other strings due to the nature of the grid)
I need some strings red, some green, and some blue.
These changes should also apply to the whole workbook not just one sheet.
So I have a macro that colors the selected cells in a certain color. Now im looking for a code that will switch that color every 7th cell, the cells will only be selected horizontally. For example:
if the selected range is 10 cells, 7 of them should be in one color and 3 of the should be in another. But if the selected range is 15 cells the first 7 should have one color and the next 7 should have another and then the last one should have the first color again, and so on..
I want a cell to be equal to another cell including the colour, conditional formatting as the colour will have no relevance to the cell value i.e. the colour will be set manually dependant on what stage of the lifecycle it is at
The original cell may have a date and be yellow and I want the target cell to be yellow with the same date, if someone then changes the original cell to be red the target cell should automatically change to Red
Is there an easy way to do this or do I need some VB script?
I am using Excel 2007. One of my worksheets has a dark border around some cells. Instead of being blue the lines are black. I used the right click and format cells option but it does not work.
I have this code but is not working, i need to make an ajustment to this as well as at present it will only change colour to 1 cell but i need it to format the whole line, this is what i have so far
I dont have that great knowledge in Excel but i wanted to try and run a macro in an IF formula but realised that was not possible. I have now got a formula that gives a value in a cell when i want the whole row to turn to red, but im not sure how i can get a macro that will change the whole row to red when that cell shows a value. Can anyone help on this matter?
I am tyring to do conditional formatting whereby if anything is entered in a cell i want the colour to change to say yellow and if nothing is entered just to leave blank.
I'm looking for some code to change a cell's fill colour
eg. by selecting an individual cell in a range, say A1, the colour of a cell, say K1, in a corresponding range changes to yellow or if I select multiple cells, say A1:A9, the colour of cells K1:K9 change to yellow
I have been trying to make it so that an autoshape changes colour according to the value of a particular cell but every time I run the macro the shape is black and I cannot work out why. The code is -
Private Sub CommandButton1_Click() Dim X As Integer X = Range("H5").Value With Sheets("Sheet 1").Shapes("Rectangle 1").Select Select Case X Case Is > 0: Selection.ShapeRange.Fill.ForeColor.RGB = 2 Case Is < 0: Selection.ShapeRange.Fill.ForeColor.RGB = 3 Case Else: Selection.ShapeRange.Fill.ForeColor.RGB = 1 End Select End With UserForm2.Hide End Sub
The company I work for has its own set of standard colours to be used in all documents. I've set the colours up in the colour palette using the below sub (x's are actually numbers):
I want to distribute this round to my workmates. Problem is that, if they set the colours in the workbook using the above sub, the workbook colours will be all wrong when clients open them on their computer. How do I get around this. I have thought about programmatically copying the sub into the open event of the activeworkbook. I've looked through this website, http://www.cpearson.com/excel/vbe.htm, but it doesn't explain how to copy code to the workbook events part of a vba project, only to a new module
I want to change the back ground colour of each row until G column when there is a text in the first cell. I have attached the excel that I want the background colour to be. Like suppose, F1 is the details of family 1, F2 is for family 2. I want each family to be coloured. The rows are not fixed for each family. If F1 details are coloured green, Fr is orange, F3 is green and F4 is orange again. And the number F1, F2, F3, F4 and so on are not ordered in ascending. They can be random. But I want the colour coding to be the same as what I have shown in the excel. I have so many rows like that. How do I do that using excel. I have tried conditional formatting. But it doesn't work.