I am trying to use conditional formatting to see if an entry on A1-A10 is found on Sheet2!A1-A10. If it is then I want it to apply conditional formatting for every cell that it is found in on A1-A10. Every solution I have found so far is asking to use a < or > 0 which doesn't work.
This is what I've started with. I know this doesn't work but I am not sure where to go from here.
=VLOOKUP(Sheet2!A1:Sheet2!A10), $A$1:$A$10, 1, FALSE)
This works:
=NOT(ISERROR(VLOOKUP(A1;Sheet2!$A$1:$A$10;1;FALSE)))
When you add a formula for conditional formatting, you write it as if it concernes only the first cell of the range, i.e. A1 in this case, although the formatting rule is applied to A1:A10.
Related
I Have a column of numbers C3 to C20 in EXCEL: -0.08, -.07, -.06,...., 0.01, 0.02, 0.03 .... 0.08
$C$1 = .03
I tested my formula =ABS(C3)>$C$1. It gives the correct TRUE and FALSE
but when I use the formula in conditional formatting and apply it to row $C$3:$C20.
it does not work. What am I doing wrong? this is very similar to some basic examples given in tutorials.
the conditional formatting with formula seems to work if I use a formula like =ISODD(ROW()) (which was given in a tutorial). So the conditional formatting is working in that particular case
However I cannot get my formula above to work. I can't figure out why. This is a very simple case. I cannot get it to work even if I use an even simpler formula like =C3>$C$1
Can you help? is there something basic I cannot see or some setting in EXCEL that need to be changed? is it my version of EXCEL that is the problem?
This works:
with this condition:
=ABS($A1) > $A$1
The $ in ABS is optional to prevent any expansion by columns, because you want to apply the rule only to column A.
You can change the value Apply to range to include the entire column as follow: A:A. For this condition doesn't matter, but there are situations where you want to apply the rule only for non empty rows, in such case you can change the above formula as follow:
=AND(LEN($A1)>0, ABS($A1) > $A$1)
I have a question with regards to conditional formatting which I simply can't seem to solve.
The aim is to format the background color for the left-most cells that are blank up until a cell contains a value - and after this there should be no more formatting in this row. You can see an image of the result I'm hoping for beneath:
So far I've managed to create the conditional formatting of the blank rows, but sadly haven't managed to create the "single-cell" formatting (in yellow) conditional of the sum of all the first cells being = 0.
I've created a formula which actually succeeds in calculating the sum of the previous cells, but this formula includes INDIRECT() which it seems that conditional formatting doesn't allow. At least I'm getting an error starting with the follow (translating the error from Danish to English might not be intuitive):
You cannot use reference operators such as.....
The formula I'm trying is the following:
=AND(SUM(A2:INDIRECT(IF(COLUMN(A2)>=27;CHAR((64-26)+COLUMN(A2))&CHAR((64-26)+COLUMN(A2))&ROW(A2);CHAR((64)+COLUMN(A2))&ROW(A2))))>0;$K2>0)
Where $K2 is the sum of the row.
Is there a way to SUM a range of cells by doing something similar to this:
=SUM(B2:CHAR((64)+COLUMN())&ROW();"")) to dynamically SUM the range from B2 to the current cell? The problem in this case is whether the part CHAR((64)+COLUMN())&ROW();"") can be converted into a legible cell such as B4 to make it work inside the =SUM() formula?
Sadly the =ADDRESS() formula cannot be used (as far as I know) as this will trigger the same error in conditional formatting as well.
For now I would like this to work with the regular Excel conditional formatting, but if anyone have a simple VBA this would also have interest - however, I would by far prefer the regular solution.
The question:
Is there a way to create a formula that doesn't trigger this error - maybe by refrasing the formula or doing something completely else?
It seems to me that this could be handled with a much simpler CFR formula like,
=and(not(sum($a2:a2)), $k2)
Am I missing something?
What I am trying to achieve is if a cell in column AB equals "Yes" and a cell in column AC is blank, then a certain range of cells will be formatted. Currently the rule is not formatting cells that it should. I am basing this code on another formatting rule I am using that works properly, but does not use AND().
=AND(INDIRECT("ab"&ROW())="Yes", INDIRECT("ac"&ROW())="")
I am sure this is an obvious syntax mistake, but I am still very new to Excel and can't figure out why this isn't working.
Try This:
=AND($AB1="YES",$AC1="")
Use the format painter to drag the formula around.
As Jeeped said, change the 1 in $AB1 and $AC1 to your first row.
I am formatting cell D25 using the following conditional formatting formula:
=(VLOOKUP($C25;$C$6:$L$18;2)+D25)>32
When applying the formula to the adjacent column I get formula updates to
=(VLOOKUP($C25;$C$6:$L$18;**2**)+E25)>32
Using the Copy and Paste Format function works mostly i.e. references in the formula are updated as I would expect.
The only (essential) thing that doesn't update is the INDEX value in the VLOOKUP formula. I would expect this value to increase by 1 when copying the format to the next column - it doesn't.
Is there any way to go around this issue with VLOOKUP? Is there a better suited formula to achieve the same result?
Any help will be greatly appreciated!!
This value does not increase automatically, and it is good. This formula was designed to be used on Tables, so consistency is a point here.
For conditional formatting, you may want to use $ to lock some references. For example, let we have the simple sheet as below:
First, select the range in the CORRECT order. This is important. the first cell you select will be reference for offsets of the conditional formatting. For this example, let's do it like this:
Now, let's go for the conditional formatting itself! Conditional Formatting > New Rule... > Use a formula to determine which cells to format. And let's put this formula:
=if($A1<=2;TRUE;FALSE)
Click OK and...
There we go! We just formatted the lines in witch An is equal or less than 2! Please note that we only had to lock the COLUMN of the reference. So, logically, to format the columns we would have locked the ROW.
Hope it helps!
EDIT:
If you REALLY want to use VLOOKUP, which I DO NOT recommend, you can just use the formula:
=(VLOOKUP($C25;$C$6:D$18;COLUMNS($C$6:D$18))+E25)>32
To change the index dinamically.
I am trying to use conditional formatting to highlight which of the cells in a row are today's date. I am using the formula:
=G2=(TODAY()) and the range is Sheet1!$G$2:$G$10.
However only the first cell in a column is highlighted even when the same date is listed below.
On a very similar formatting formula (=E2="High" on the range E2:E10) the formula seems to work a treat! I can't work out why there is a difference.
Thanks,
Alex
Please try:
=G2=TODAY()
(but only because one set of parentheses is not required!) and for Applies to:
=$G$2:$G$10
The Applies to range has to be in the same sheet as is G2 in your formula.
I suspect if you go back to the Conditional Formatting Rules Manager you will see that what you entered was automatially removed (substituted by =$G$2, hence the one cell that 'works').