How to conditional format based on multiple specific text in Excel - excel

I have a spreadsheet that i use to determine when/what clients to contact when an issue arises. in the first workbook i insert a column every day and paste in information about any questionable habits from clients, including a client ID. unfortunately the data i am copying from also includes clients that are not to be contacted during an issue. i have a second page that has listed in column A all of the "dont check" client ids. is there a way to conditional format the original page to color any cells referencing a "dont check" client based upon the don't check listing in sheet 2?
EDIT: there is more than just client ID in the first sheet cells. client id is just included. the format is [(last file received date)(Client Name)(Client ID)(Last X file received date) (Last Y file received date)] all in one cell.
In theory what i would like is to go to conditional formatting, highlight cell rules, text that contains... then select A1-A45 on Sheet2 and click okay. obviously this is not possible. an error shows up stating "this type of reference cannot be used in a Conditional Formatting formula. Change the reference to a single cell, or use the reference with a worksheet function such as =SUM(A1:E5)
Thanks in advance.

You can use MATCH for instance.
Select the column from the first cell, for example cell A2 to cell A100 and insert a conditional formatting, using 'New Rule...' and the option to conditional format based on a formula.
In the entry box, put:
=MATCH(A2, 'Sheet2'!A:A, 0)
Pick the desired formatting (change the font to red or fill the cell background, etc) and click OK.
MATCH takes the value A2 from your data table, looks into 'Sheet2'!A:A and if there's an exact match (that's why there's a 0 at the end), then it'll return the row number.
Note: Conditional formatting based on conditions from other sheets is available only on Excel 2010 onwards. If you're working on an earlier version, you might want to get the list of 'Don't check' in the same sheet.
EDIT: As per new information, you will have to use some reverse matching. Instead of the above formula, try:
=SUM(IFERROR(SEARCH('Sheet2'!$A$1:$A$44, A2),0))

Suppose your "Don't Check" list is on Sheet2 in cells A1:A100, say, and your current client IDs are in Sheet1 in Column A.
What you would do is:
Select the whole data table you want conditionally formatted in Sheet1
Click Conditional Formatting > New Rule > Use a Formula to determine which cells to format
In the formula bar, type in =ISNUMBER(MATCH($A1,Sheet2!$A$1:$A$100,0)) and select how you want those rows formatted
And that should do the trick.

Related

Highlighting cells in a column based on other cells dates in the same row

I have a spreadsheet that is used to track the last date a set of logs was downloaded.
We need to take logs at around the 7 day mark if possible (not critical)..
We have approximately 170 assets that we do this to.
The way the spreadsheet is set up the new date is added to an ever expanding list (rather than just overwriting) i have used conditional formatting to show that a date is less than 7 days old but that cell can be 20 columns accross and is still hard to cross reference to the asset number. I want to highlight column A if any other cell in the same row is highlighted (unless you have a less clunky way of doing it, having the date highlighted really is unimportant it is simply as far as i can get on my own.
I even tried doing a sort by cell colour but that seems to require that i pick one coulmn only.
Thanks for your help.
Conditional formatting will do this for you. I used this example:Column A has dates, Columns B and C have miscellaneous gibberish. (click the link to view the image)
Select the entire range of cells you want to follow these rules (possibly just "select all" to be sure you are getting future additions as well, then choose Conditional Formatting from the ribbon.
Conditional Formatting > Use a formula to determine...
Then enter the following code. =TODAY()-$A2<7 Update $A2 with whatever cell contains your first date value, and be sure to put a $ in front of its column reference so that the formula references only your date column and doesn't wander.Code: =TODAY()-$A2<7
Click the "Format" button to set whatever format you like (I chose yellow fill).

How to generate an error message when a particular cell is blank

I have two columns in excel in one column i have system id,name,salary,date in other column i need to enter the corresponding values. If there is no value for a particular row then an error message should be generated. Is there a way to do it in excel??
example:
Column 1 Column 2
system id 10
name
salary 1000
date
In the above example there is no data for name and date columns.Is there any way that we can automatically generate an error message saying that there is no data in that particular cell. Thanks in Advance
Try using Data Validation available in Data menu. I think it can work for you.
Lets use both conditional formatting and a formula.
Setting the Stage:
We will apply conditional formatting to cell B1 and use the format painter to apply the change to all the other cells.
Click "Conditional Formatting" and navigate to "New Rule":
Click "Use formula to determine which cells to format" and enter the formula "ISBLANK(YourCellHere)" into the text box. Replace "YourCellHere" with the first cell you want to apply conditional formatting to. In this example "B1" is that cell. You will also need to specify how blank cells should be formatted. This is accomplished by selecting options via the "Format..." button. In this example's "Red" was selected for the "Fill".
Click the "Format Painter" button and drag the brush over the cells the conditional formatting should be applied to.
You can use if() and isblank() together as shown in the example below
Row A B C
1 system id 10 =if(isblank(B1),"No value","Value present")
2 name
3 salary 1000
4 date

Highlight a cell on one worksheet if another cell on a different worksheet doesn't have the exact same text

I am using a spreadsheet for accounting purposes. I have separate sheets for budget, categories, and report.
I want to know how to use conditional formatting to accomplish the following:
If I change a subcategory in my categories sheet (cell A5), I want the content to match the text in my budget sheet (cell A13). If it doesn’t match exactly then (cell A5) would be highlighted pink. And if it doesn’t match exactly the text in my report sheet (cell A23), then (cell A5) would be highlighted brown.
In this forum I was told to use indirect() for cells in multiple sheets, but everything I have tried has not worked. I must confess that I am a novice to Google docs spreadsheets. If someone could give me a very, very simple example of matching the text of a cell on one sheet to the text in a cell on a different sheet it would be very useful. It is used to remind a person who adds or changes a subcategory on one sheet, that it needs to be added or changed on another sheet or two to keep the document uncorrupted.
Try selecting cell A5 and click Format > Conditional formatting > 'Value is not equal to':
=INDIRECT("Budget!A13")
=INDIRECT("Report!A23")
Note that I've set these up as two separate rules, with the 'Report' rule being evaluated first. This can be changed by dragging the dropping in the
rules window though
See this example Sheet and change the value in cell A5 to see it working: https://goo.gl/ZGzLVv

Highlight cells based on 10-15 values and post alternatives

I have a 1600-2000 rows of data in a spreadsheet that changes daily. I would like to highlight any row that contains such as 000000000000053851 in the R column. I had tried conditional formatting using this formula:
=OR($R1="000000000000549543",$R1="000000000000267294,$R1="000000000000053851")
but it seems to highlight a few rows that are blank in column R also.
Using the same numbers highlighted in column R, I would like to have an alternate number and possibly other data pasted into the corresponding row in column S. Each number has a unique alternate number and data to go along with it. This is how I picture a line may look with the highlighting and alternate data next to it:
I intend to record a macro using a few of the different steps that are likely required to do this. Any way, whether conditional formatting or an array formula, would be great to help with this.
For the sample provided, a CF rule of:
=LEFT(R1,12)="000000000000"
applied to ColumnR will format the sample and if you wish the cell immediately to the right. It will not highlight blank cells.
HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true:, enter formula from above and Format... with Fill red, OK, OK.
If you want the cell to the right to be formatted also, select ColumnsR:S instead of just ColumnR and change R1 in the formula to $R1.
For the cell to the right you provide few details but VLOOKUP in conjunction with a two-column table should suit. Column on the left being the ColumnR value, with the right-hand column for the same row the ColumnS value required. This table could be placed almost anywhere.
This could all be done with Record Macro.

Conditionally formatting if multiple cells are blank (no numerics throughout spreadsheet )

I have created a spreadsheet in Excel and am attempting to use Conditional Formatting to highlight a cell or row if any or all of the cells in the last four columns are blank. My columns consist of name of account, store manager, city, state, visit 1, visit 2, visit 3 and visit 4.
When an account is visited notes are written in the "Visit" cell and if an account does not need a visit an X is put in each "Visit" column that is not needed (some accounts need one visit, some two, some all four).
Is it possible to have the Account Name and/or Manager Name highlighted when any visits are left blank, indicating they need to set up a visit that is necessary?
I have tried the instructions below but it didn't seem to work for the range of information I was looking for.
Open the 'Conditional Formatting Rules Manager' (Conditional
Formatting->Manage Rules).
Click 'New Rule' and choose "Use a formula to determine which cells
to format".
In the "Format values where this formula is true:" box, enter the
cell which you want to check if blank.
Place a dollar sign in front of the letter of the cell reference to
make it affect only that row, not the whole table or just the cell.
Type ="" at the end of the box to check for if the cell is blank.
Click "Format..." and go to the "Fill" tab to choose a colour to
fill the row if true and click "OK".
Click "Okay" to close the 'New Rule' dialog.
Change the "Applies to" value of the rule you just created to the
scope of the entire table to make the rule apply to it. (If your
table has a reference name, you can enter it here)
Click "Okay to close the 'Conditional Formatting Rules Manager'.
How about just > Format only cells that contain - in the drop down box select Blanks
Select columns A:H with A1 as the active cell.
Open Home ► Styles ► Conditional Formatting ► New Rule.
Choose Use a formula to determine which cells to format and supply one of the following formulas¹ in the Format values where this formula is true: text box.
To highlight the Account and Store Manager columns when one of the four dates is blank:        =AND(LEN($A1), COLUMN()<3, COUNTBLANK($E1:$H1))
To highlight the Account, Store Manager and blank date columns when one of the four dates is blank:        =AND(LEN($A1), OR(COLUMN()<3, AND(COLUMN()>4, COUNTBLANK(A1))), COUNTBLANK($E1:$H1))
Click [Format] and select a cell Fill.
Click [OK] to accept the formatting and then [OK] again to create the new rule. In both cases, the Applies to: will refer to =$A:$H.
Results should be similar to the following.
  
¹ The COUNTBLANK function was introduced with Excel 2007. It will count both true blanks and zero-length strings left by formulas (e.g. "").
The steps you took are not appropriate because the cell you want formatted is not the trigger cell (presumably won't normally be blank). In your case you want formatting to apply to one set of cells according to the status of various other cells. I suggest with data layout as shown in the image (and with thanks to #xQbert for a start on a suitable formula) you select ColumnA and:
HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND(LEN(E1)*LEN(F1)*LEN(G1)*LEN(H1)=0,NOT(ISBLANK(A1)))
Format..., select formatting, OK, OK.
where I have filled yellow the cells that are triggering the red fill result.
If you place the dollar sign before the letter, you will affect only the column, not the row.
If you want to have it affect only a row, place the dollar before the number.
You may want to use =isblank() rather than =""
I'm also confused by your comment "no values throughout spreadsheet - just text" - text is a value.
One more hint - excel has a habit of rewriting rules - I don't know how many rules I've written only to discover that excel has changed the values in the "apply to" or formula entry fields.
If you could post an example, I'll revise the answer. Conditional formatting is very finicky.

Resources