d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Excel Help
Add Reply New Topic New Poll
Member
Posts: 38,019
Joined: Feb 14 2011
Gold: 6.90
Apr 6 2016 12:17pm
I want to autofill 2 columns with a color IF another column has a constant, is this possible? thx
Member
Posts: 5,893
Joined: Jul 22 2006
Gold: 0.00
Apr 6 2016 04:53pm
For this example, I'm using D3 as the cell that would have a value, and C3 as the cell that would be highlighted.

Click on C3
Click on Conditional Formatting -> Based on a forumula

For the formula enter:

=D3<>""

Member
Posts: 21,893
Joined: Mar 27 2009
Gold: 12,408.00
Apr 6 2016 05:30pm
Ok this isn't that difficult to accomplish. Excel allows for this automatically.

This can be done without R1C1 referencing, but since that's how I learned to program in VBA, I always use R1C1 referencing so this may look foreign to you.

I entered numbers randomly into column 1, then highlighted column 2 and did a conditional format on the whole column. I selected "use a formula to determine which cells to format". The formula is simple: =isnumber(RC[-1])

This will apply the formatting if the cell in the same row (R) and one column to the left (C[-1]) is a number.

This works when you add new numbers into column 1, and will highlight column 2 regardless of what it contains.



This post was edited by Dontrunaway on Apr 6 2016 05:43pm
Member
Posts: 38,019
Joined: Feb 14 2011
Gold: 6.90
Apr 6 2016 09:39pm
Quote (Dontrunaway @ Apr 6 2016 06:30pm)
Ok this isn't that difficult to accomplish. Excel allows for this automatically.

This can be done without R1C1 referencing, but since that's how I learned to program in VBA, I always use R1C1 referencing so this may look foreign to you.

I entered numbers randomly into column 1, then highlighted column 2 and did a conditional format on the whole column. I selected "use a formula to determine which cells to format". The formula is simple: =isnumber(RC[-1])

This will apply the formatting if the cell in the same row (R) and one column to the left (C[-1]) is a number.

This works when you add new numbers into column 1, and will highlight column 2 regardless of what it contains.

http://puu.sh/o8QCu.png


Much thanks.
I just didn't know the formula =[
Was thinking of something along like =if(ISNUMBER($A:A)) and so on from there lol.
Will do your formula tomorrow when I get to work. This will save me like 2hours of work <.< (Making amends to contracts and gotta highlight shit and label the amends number and amend them.) Dislike moving mouse back and forth to highlight

Uhhhh can I make the formula something like.
=isnumber(R$A:A) or has to be C[ ]

This post was edited by Uguu on Apr 6 2016 09:41pm
Member
Posts: 21,893
Joined: Mar 27 2009
Gold: 12,408.00
Apr 7 2016 04:52pm
Quote (Uguu @ Apr 6 2016 10:39pm)
Much thanks.
I just didn't know the formula =[
Was thinking of something along like =if(ISNUMBER($A:A)) and so on from there lol.
Will do your formula tomorrow when I get to work. This will save me like 2hours of work <.< (Making amends to contracts and gotta highlight shit and label the amends number and amend them.) Dislike moving mouse back and forth to highlight

Uhhhh can I make the formula something like.
=isnumber(R$A:A) or has to be C[ ]


Yeah for A1 formatting just change it to =isnumber($A1) ($ in A1 referencing stands for absolute, and without $ means relative). So do $A with whatever letter of the column you are interested in, and then the 1 idk exactly how it works in this referencing but it does, I tested it.

This post was edited by Dontrunaway on Apr 7 2016 04:54pm
Go Back To Homework Help Topic List
Add Reply New Topic New Poll