Shading Alternating Rows In A Range
Nov 30, 2006
Is there a way to shade alternating rows in a range and have it always be alternating no matter if a row is added in the middle of the range. If I do it manually now and add a row it messes up the shading and fixing it manually is very time consuming.
View 7 Replies
ADVERTISEMENT
Aug 18, 2006
I'm trying to use the following formula in conditional formatting in cell A2 when the range A2:AW64 is selected (this conditional
formatting will be copied to all cells in the selected range):
Formula is: =isodd($A2)
The error I keep getting is this:
"You may not use references to other worksheets or other workbooks for Conditional Formatting criteria."
I'm trying to use this conditional formatting because column A is our "Order" column. "Order" can be from 1 to 13 and this column
is sorted ascending. There can be multiple rows in each Order number. So I want to shade all 1's, 3's, 5's, etc... so that each
Order group has alternating shading.
I also want to use conditional formatting, not VBA, to get this to work. In the future, rows might be added to an Order number or two and I want the shading to automatically adjust.
View 10 Replies
View Related
Nov 29, 2006
to tint/color alternating rows with white on my worksheet so when new rows are entered the sheet will adjust maintaining this pattern
View 6 Replies
View Related
Apr 13, 2009
I was wondering, what would the macro be to colour alternating rows.
So I could select the range of rows, hit the macro - and it would colour them for me?
I need it to do alternating green / lightgreen. For one, but I need to do other colours afterwards as well. So what would the code be to do this?
View 10 Replies
View Related
Aug 1, 2014
My spreadsheet has rows with inspection numbers in column A, but there are varying numbers of rows associated with an inspection number. I'd like to change the color of the rows for every other inspection number to yellow using a formula. I think it has to involve an if/then statement but I can't figure out how to word the formula to just choose every other group of inspection numbers.
Example:
inspection numbers
date
description
[Code].....
View 5 Replies
View Related
Jan 28, 2008
In column H I have dates from 1/1/2008 to 12/31/2013. What I would like to do is transfer that data to column J, but alternate it every other row and then insert the word Date into the blank cells. For instance J1 would read "Date" and then J2 would read 1/1/2008 J3 would be Date and J4 would be 1/2/2008. I have a large database and I tried to use array formulas and they slow it down to a crawl so I was working with DSUM, but I don't feel like wasting time with adding in Date manually.
View 8 Replies
View Related
Jan 18, 2014
I'm looking for a way to count groups of alternating rows of "TRUE" values across 3 columns. There will never be an occurrence of more than one "TRUE" value per row. In the sample below, alternating TRUE values occur in rows 4 through 7, so this would be counted with the groups of 4.
1Column 1Column 2Column 3
2FALSEFALSETRUE
3FALSEFALSETRUE
4FALSE TRUEFALSE
5 TRUEFALSEFALSE
6FALSE TRUEFALSE
7 TRUEFALSEFALSE
8FALSEFALSETRUE
9FALSEFALSETRUE
10FALSEFALSETRUE
View 4 Replies
View Related
Jul 21, 2009
I am interested in selecting cells in alternating rows as follows:
12 Red Happy
00 Unique descriptor
13 Grn Sad
03 Unique descriptor
14 Yel Happy
02 Unique descriptor
I am interested in selecting all the "12, 13, etc", "Red, Grn, ..." and "Happy, Sad..." for analysis, but want to skip all the rows containing the 0- numbers and the descriptors for them. How do I quickly select only the alternating cells in a column within a selection?
View 9 Replies
View Related
Sep 13, 2006
I'm writing a macro that’s taking user input (from a form I developed) and will generate a chart according to the input.
One requirement for this chart is that the background alternates fill colors between gray and white. Every four columns need to be either gray or white. Based on the duration the user entered, the width of this chart is created. The length (the number of rows) is constant.
I've tried different loops (for, if, do - you name it I tried) This loop is just out of my league. Any and all help would be greatly appreciated.
Summary of Facts:
- Starting Point of Chart is B2 (the top left corner of the chart will be in B2)
- the number of columns is dynamic (based on user input)
- The rows are constant are (2 through 16)
- Every four columns need the fill color to be either gray or white
View 8 Replies
View Related
Oct 24, 2005
Can I automate an excel worksheet such that if ,say, "436" is written in a
certain cell it shades that row yellow, or if "437" is in that cell it
shades the row blue. It would then be easy to visually tell in an excel
chart which lines belonged to ,say, specific companies.
View 9 Replies
View Related
Jul 13, 2014
I'm using the below code to shade rows, but right now it's only coloring the first cell in B12. I'd like to shade the row from B to the last used column
[Code] .....
View 8 Replies
View Related
Mar 5, 2014
I have a file that contains multiple rows of data. I built a macro that will then hide rows with a $0 balance. When the macro is completed, my spreadsheet is only showing the lines with a $ amount. (The $0 rows are hidden)
What I'd like to do is then format the unhidden rows so that each alternate row is color coded. This will separate the rows visually so I can more easily follow the rows across to view $'s per line.
I've attached a sample spreadsheet (it does contain the macro to hide the $0 rows). How can I then format the remaining rows with alternate shading?
View 4 Replies
View Related
Dec 26, 2013
I need a macro that will clear the contents of all cells shaded white in range c1:c20.
Clear the contents, leave the cells shaded white.
View 1 Replies
View Related
Mar 15, 2014
I have a column (k) of 65,000 rows with numbers that are either positive or negative digits. The next column (L) has classified them as either 1 for positive number or 2 for negative.
There may be a run of all positive or all negative numbers or 2 positives and 3 negatives or any combination of positive and negative numbers reading down the column.
Reading down the column (from L1), I need to find any sequence of alternating 1 positive, followed by 1 negative or vice versa.
I am looking for evidence to find any sequence that has more than 2 alternations. (Remembering that positive is 1 and neg is 2)
That is, two or more alternations of a positive followed by a negative or neg followed by a positive.
eg
1
2
1
2
or
2
1
2
1
View 4 Replies
View Related
Mar 6, 2009
I have a bunch of start End times in columns calculating total time :-
View 12 Replies
View Related
Aug 25, 2014
I'm sure there's a simple way to do this (I've been trying countif/match formulas but I'm not quite there)! I need to group line items with the same dollar value, WITHIN say 1 cent. If I do a pivot it will group exact matches, but I'm looking for the flexibility to group something within a few cents. So instead of pivots, I was trying to think of a formula that would do what Column A is doing below:
*I manually added Column A, looking for a formula that would group dollar values within 1 cent, assuming I've sorted Column B from smallest to largest:
Column A : Column B
1 : $2.13
1 : $2.14
2 : $3.00
2 : $3.01
2 : $3.01
3 : $4.00
View 4 Replies
View Related
Aug 12, 2010
I'm looking for a way to put data into 1 column from 2 different columns, alternating every other row.
The data looks like this:
A B C
1 2
3 4
5 6
And I want C to look like this:
C
1
2
3
4
5
6
I don't necessarily need to keep the data in columns A and B, as long as C follows this format.
Excellent, just what I was looking for. I couldn't get the UDF working right, I'll try messing around with it, but the Index solution works great!
View 5 Replies
View Related
Mar 13, 2014
I have sets of data... like so:
A word text blablabla
B word text blablabla
A dog cat france
B dog cat france
B this that other
A this that other
A tiger dragon monkey
B tiger dragon monkey
My source data I can't get to sort alternating on columns A and B, and I would like the data to alternate A-B-A-B-A-B while retaining the pairings of data in the adjacent fields. Is this possible?
View 1 Replies
View Related
Feb 21, 2014
I have a spreadsheet that contains thousands of rows and I need to highlight all the duplicates in Column B.
What I need though is one group o duplicates to be colored one color and then the next group of duplicates be colored a different color. I need just a 2 color banding.
My need for 2 colors is that the cells contain 9 digit numbers and there can be duplicate groups right next to each other and for the eye to distinguish a different grouping of cells I need that 2 color banding.
I have the below code that colors everything in one color. Can I be modified or a completely new code to do 2 colors?
Code:
Sub Dups()
Dim Rng As Range
Dim CL As Range
Set Rng = Range(Range("B1"), Range("B" & Rows.Count).End(xlUp))
For Each CL In Rng
If WorksheetFunction.CountIf(Rng, CL.Value) > 1 Then
CL.Interior.ColorIndex = 6
End If
Next CL
End Sub
View 1 Replies
View Related
Jan 4, 2014
how to add alternating cells when all are numbers, e.g. B8 to KW8 are all numbers and I want to add B8, D8, F8, etc. until KV8 and then separately add C8, E8, G8, etc until KW8. Is there a more efficient way to do this than =sum(b8,D8, etc)? I also need to do the same with =counta(b8, d8, etc).
View 2 Replies
View Related
Feb 18, 2010
so I have been googling to figure out how to write a macro that will select every other column on my workbook. All that keeps coming up is conditional formatting, which I do not want. I am not trying to highlight the columns in alternating colors, I just want to select them.
I am starting at column F and I would like it to search until the end of the columns and select every other column ending with the last column with data in it.
I know I could search by a specific row and tell it to find the first blank cell then offset it, but there is no particular row that will always have data in it, so I guess it needs to check by column until it finds the first column without any data in all rows and then offset it.
Anyone know what I am talking about here?
I know it should be fairly simple but I couldn't seem to find any answers anywhere else.
Also, anyone know any good websites that have definitions for some basic macros? I'd love to start learning how to write this stuff on my own.
View 7 Replies
View Related
Jun 2, 2014
I am having a hard time getting my match functions to work with letters and numbers in the same range. I am also trying to figure out a way to have the ranges switch if there is an error. because the data is in multiple columns. It is hard to explain so I have attached a sample workbook.
ExampleFile.xlsm
View 13 Replies
View Related
Jul 20, 2009
I have thousands of lines of data that are of the following form:
Jackson, TN 9623 BCBS TN 98 UnitedHlthCare 2
Jacksonville, FL 3577 Aetna 47 BCBS FL 37
Knoxville, TN 3796 Cariten 44 John Deere 41
Lakeland-Winter Haven, FL 2165 UnitedHlthCare 31 Aetna 29
I need to separate these lines into columns such that, for example, the first line would be in 6 columns: (Jackson, TN) (9623) (BCBS TN) (98) (UnitedHlthCare) (2)
The delimiter does not work because some of there is no one character that always separates the text and the numbers. I've tried going through in word and typing something like '%' where I want to separate, but with thousands of lines of data that is extremely tedious.
Is there any formula I can use that would be capable of solving this?
View 9 Replies
View Related
Jan 2, 2007
I have two columns. Date and Day
E.g.
Date Jan 1, 2007 and it falls on on a Monday in the Day column.
Date Apr 6, 2007 and it falls on on a Friday.
Date Dec 25, 2007 and it falls on on a Tuesday.
What I want is to Colour Code the DAY column in case it is a holiday falling on a Monday or a Friday.
View 9 Replies
View Related
Mar 7, 2009
I have a spreadsheet I use to keep my bank balance in...
I have this forum at the VERY top of it to show my bank balance:
=G3+SUMIF(H4:H2999,"X",E4:E2999)-SUMIF(H4:H2999,"X",F4:F2999)
Once an item clears, I put an X in column H, and then it updates the balance at the top to make it so I can reconcile easily.
What I want to do is have every line without an X in column H to show up a shaded color... any easy way to do this?
View 11 Replies
View Related
Mar 26, 2013
When I run a particular module of code that unhides several rows of a worksheet, revealing cells that are automatically populated and editable by the user, there are a few cells that are lightly highlighted in blue. This isn't to be misunderstood as background ... background shading goes righ to the 4 lines of the cell grid. This shading is a few pixels off the gridlines. Similarly, there are highlighted row numbers and column letters. The cells that are highlighted are a few of the cells that are locked for editting and are a result of a copied over formula. The highlighting goes away when you click on that cell.
One could almost say something is identifying the locked cells of the worksheet.
.Code:
Sub populate_existing()
Dim wshmain As Worksheet
Dim wshcore As Worksheet
Dim CRID As Long
Dim vlrange As Range
Set wshmain = Worksheets("Main")
Set wshcore = Worksheets("CONTROL_1")
CRID = wshmain.Range("B14")
Set vlrange = wshcore.Range("A:DZ")
[code]....
The cells highlighted are: G26, N26, X25, AE25, AE27, AL26, K42, R42, Y42, AF42, G47, N47, N49, G54, and N53.
I wasn't able to take a snapshot of the shading, it didn't show up in the Snippit tool image.
View 1 Replies
View Related
Nov 7, 2007
I wish to fill cells with black colour for service days staff are not selectable.
The column Entitlement is a formula working on the year start date compares to to the employee start date to work out the days entitled.
What vba or formula(unlikely) do I need to achieve this?
******** ******************** ************************************************************************>Microsoft Excel - Holiday Allowances 2007.xls___Running: 11.0 : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutH5H6H7H8H9H10=
ABCDEFGHIJKLMN1*Year*Start01/04/2007**********2OfficeNameNo.Start
DateWorking*Week*Entitlement12345*3****DaysHours********4**************56000Coley*B.27429-Dec-0117*2******66000Cox*D.A.2324-Jul-73537.5*5******76000Elsom*Lucy23304-Aug-0300*1******86000Graham*A.3919-Feb-65537.5*5******96000Graham*G.W.4001-Jan-8217*5******106000Hallam*K.A.15502-Dec-85649*5******Sheet2*
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.
View 9 Replies
View Related
Feb 4, 2010
I am trying to write vba code that will highlight the row in the range if a field is over a certain percent. The column number won't change but the number of rows will. I'd also like the code to automatically work on all tabs of the workbook when a button is clicked.
Data Info:
Currently there are 4 tabs, but can have more/less
Columns used are A:O
Data for shading starts at A3 and should go to however many rows have data and ignore blank rows
Formula should be if data in column E is over 10.00% then the data in that row A:O should be shaded in the color off yellow & have black thin orders
If the data in column E is not over 10.00% then the data in that row should not be shaded but still have thin black borders.
View 9 Replies
View Related
Aug 6, 2012
The logic is that I want the cells to be highlighted and have a border drawn for them as shown in the attached sheets (I have used record macro which will do this for rows 39 and 40 when the click button is clicked). The highlighting should start at the row number specified, stop once a merged cell is reached, skip the merged cell, continue highlighting, stop once a merged cell is reached, skip the merged cell, continue highlighting and so on and on until the last row (which is user specified) is reached. The first row after the merge cells should be highlighted in grey and yellow.
View 9 Replies
View Related
Jul 28, 2014
How do I shade a whole row based on the value in one of the columns?
View 11 Replies
View Related