change cell color with conditional format - excel

I wanna ask about Ms. excel. maybe it will look so basic for someone who always work with excel. so thank you for anyone who help me with this.
I have sheet1 and sheet2. so i want to make cell in column A sheet 1, which have same data exist in column A sheet2 to change color automatically.
I don't know how to make it work so I made column helper in column c sheet1 with this formula
=NOT(ISERROR(MATCH(a2;sheet2!$A$2:$A$1000;)))
and get true if the data exist in sheet2. and then I drag that formula so all column c have this formula.
I thinking using conditional formatting, so I block column A in sheet 1, and make conditional formatting with formula
=C:C= "TRUE"
but this not work. i really a newbie and only study by myself from internet, but i dunno how to search to solve this problem.
any help or advice for this problem?
thank you so much before

You can put the formula that returns TRUE or FALSE directly into the conditional formatting rule.
You should define it on cell A2 first, then change the 'Applies to' range to be all the rows you want to test. If you can, I recommend you try to avoid using references like C:C.
So, supposing you want to test the data in cells A2:A10 on sheet1, then your rule would look something like this:
Note that my locale uses comma as parameter separator and not semi-colon, so you should adjust accordingly.

Try the following formula in CF rule.
=COUNTIF(Sheet2!$A:$A,"*"&$A1&"*")>0

Related

Check for specific formula (no VBA)

Is it possible to check if cell formula is a specific formula, and not just "isformula" ?
My example:
In cell A1 I have, normally, "=B2".
But during the use of this sheet the formula might be overwritten to "=D4".
How can I get a simple TRUE result if the formula in cell A1 is "=D4", and FALSE if it's something else ?
I get fix it with VBA but I prefer to use standard formulas first (if it's possible obviously).
Thanks for your time.
Using FORMULATEXT:
=FORMULATEXT(A1)="=D4"

Excel Dynamic Conditional formatting

I am sure this is really simple but cannot get it to work. I am trying to do some conditional formatting on a sheet that over time will have additional columns added to it. I want the formatting to be there before hand since the data is being added via VBA and the person using the spreadsheet are not Excel experts.
What I have is a column with numbers in. When a new column is entered I want to compare the value with the value in the previous column and then colour the cell accordingly. I can do this for a single cell with for example "=D2>C2".
I want to be able to write the rules in cell D2 comparing it with cell C2 and then have the rules apply across the area D2:DDD300. So for example cell N19 will compare itself to cell M19.
I thought I could use the "Applies to" box but that does not work. Any ideas on how I can achieve this?
Okay this now appears to be working. Not sure what I did differently but deleted all the rules and then set them up again. The only thing I did different was to initially do it for just the 1 cell, then expanded it out to the row when I knew it was working, then finally the whole area.
Sorry to have wasted peoples time
Your method should work. It does for me. Maybe this helps:

Conditional Format Based on User Input

I am trying to use conditional formatting but I am running in to issues.
I have a single range which is populated based on user selection for an ActiveX ComboBox. What I am trying to do is highlight rows if the single range of cells contains duplicate values, but if the cell is blank, contains the word "Value", or does not match another cell in the range then leave the cell and row as is.
Basically if Cell B4 equals B46 then highlight both rows.
I have tried the following formulas with no success.
=IF(AND($B$4:$B$50="",$B$4:$B$50="Value"),0,COUNTIF($B$4:$B$50,$B$4:$B$50,0))
=IF(AND($B$4:$B$50="",$B$4:$B$50="Value"),0,MATCH($B$4:$B$50:$B$4:$B$50,0))
=IF(AND($B$4:$B$50="",$B$4:$B$50="Value"),0,IF($B$4:$B$50=$B$4:$B$50,1,0))
I'm still learning excel and could use some help on this. Thanks in advance!
Eric
I suspect what you want is a CF formula rule something like:
=AND(NOT(OR(B4="",B4="Value")),COUNTIF(B$4:B$50,B4)>1)
applied to B4:B50.
Thank you everyone who provided a response. I was able to develop a solution that worked based on your responses. The following is the solution I used:
1.) Created a conditional format highlighting duplicate values.
2.) Created a conditional format using the below formula to highlight duplicate rows, ignore blank rows, and ignore rows with "Value" in cell B4:
=AND(COUNTIF($B$4:$B$63,$B4)>1,LEN($B4)>0,LEN($B4)-4>0)
Thank you once again for everyone's assistance.
Eric

AND / INDIRECT Conditional Formatting

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.

Copying conditional formatting with VLOOKUP across columns

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.

Resources