I have a range of dates in the following format
Hire TERM ReHire1 TERM2 ReHire2 TERM3 ReHire3 TERM4
The problem is that some rows might be missing a date, say a row will have dates in all but 'term' (B2). I can go in and use the filters to show blanks, but this becomes a nuisance when there are 15-20 date columns. Is there a formula that will look at the whole range and return an error of sort where there are empty cells?
Below is a comma delimited sample data that you can import into excel to help illustrate.
Hire,TERM,ReHire,TERM,ReHire,TERM,ReHire,TERM
05/06/2002,12/09/2002,,05/12/2003,02/10/2004,03/29/2005,,
05/30/2000,05/24/2004,09/27/2004,11/27/2004,,08/31/2006,05/24/2007,
03/15/2004,02/01/2005,02/16/2005,06/13/2005,02/06/2006,03/13/2006,10/14/2007,01/06/2008
03/13/1998,08/28/1998,,11/20/2000,11/03/2002,07/23/2009,09/08/2009,11/21/2009
07/12/2007,05/01/2009,07/12/2007,05/01/2009,07/28/2011,,07/28/2011,
12/20/2004,11/11/2005,02/23/2009,11/25/2009,08/10/2010,08/24/2010,,
08/23/2001,08/11/2002,,11/22/2006,01/15/2007,,,
Additional details per feedback:
A missing value -or "gap" as I call it- would be if a row has dates under hire and rehire but no date on Term.
You can either:
Split your data with Excel builtin solution and choose to split on commas ,
Select your data on Excel
Then click on "Data", "Text To Columns..."
Click on the "Delimited" radio button
Then click on the "Next" button, in "Delimeters" put a checkmark in "Comma"
Then click on the "Finish" button.
and then find the empty cells with a conditional formula
Use this kind of formula
=IF(ISERR(FIND(",,",A1)),"Missing value","")
to check if there is any missing value
One option would be to use conditional formatting on the cells. In Excel 2010, highlight the data range, pick "home->conditional formatting->highlight cell rules->more rules".
Then pick "format only cells that contain" and change the drop down with "Cell Value" to "Blanks" and click the "Format..." button and set how you want it highlighted (Fill color to yellow for example).
Alternativley, you could add a formulae "countblank" either over the the entire range or a subrange (row for example) and it will specify the number of blank cells. For example, you could in the final column add "=countblank(a2:h2)" and then filter the results for anything greater than 0. This would show you all the rows with missing data and you could correct them as needed.
I have imported your data into Excel 2011 on a mac.
If I understand your question, all you want to do is to find the empty cells. Then you just press CMD-F or CTRL-F on windows to start a search. You just leave the search field empty. Excel will then show you the empty fields one by one.
Related
I'm quite new to programming, so I don't know if I am using the right words, BUT I'm creating a pivot table for my list of library books, and I want to hide all those 1s.
As you can see, I have those lines of 1s next each of the book titles under the subtotal, and I was wondering if there was a way to disable them because they look quite distracting. Thanks so much!!!
Pivot table values will always show. Filtering, as suggested in a comment, is probably not what you want.
You could use conditional formatting to hide the 1's for the individual values. In the screenshot, I'm counting the "Title" column of the data. Select one of the "1" values, then click Home ribbon > Conditional formatting > New Rule
Click the option highlighted with the arrow. It will show your column name instead of "title".
Then click "Use a formula to determine ...." and enter the formula like below:
My selected cell is F6 and whatever cell you have selected needs to go into the formula box WITHOUT the dollar signs!
Next click the Format button and use either white font on white background, or a custom number format ;;;.
Confirm all the dialogs and enjoy the result. Note how the subtotal "1" for 30-Jun did not disappear, because the conditional format acts only on cells showing "Count of title" values for "Title", as ticked in my first screenshot.
I am trying to highlight cells that fall outside the expected value range (higher or lower only). Each row corresponds to a different row that has two cells with a max and min. Is there a way to make Excel figure that out?
For example Row 7's cells should only highlight if they value is outside the min of B31 or max B32. And Row 18 should be governed by Row 42.
I have used conditional formatting. But I want to apply the same logic to all the cells and rows instead of doing them one by one.
Scott Craner's suggestion is spot on. You can use a formula inside of your conditional formatting by following the instructions below:
Select Cell B4 (Sodium baseline test results)
Click "Conditional Formatting" in the Ribbon, "Highlight Cells Rules", and then "Less Than"
In the dialog that pops up, enter the following formula:
=VLOOKUP(A4,$A$27:$C$48,2,FALSE)
Click OK to save and apply the conditional format.
Click the B4 Cell again, and select the bottom right corner (you should see a little box sort of that you can click and drag).
RIGHT CLICK AND DRAG (not left click/drag) that bottom corner so that all the cells get selected. Then when the dialog box pops up, select "Fill Formatting Only". This will apply the formula to all the cells, and the lookup conditions automatically update based on the test name in the same row.
Repeat the above for the Greater Than rules, but modify the lookup formula as follows so that it looks up the MAX (3rd) Column:
=VLOOKUP(A4,$A$27:$C$48,3,FALSE)
If this answer was useful or helpful, please mark or indicate as such, thank you!
I'm not even sure if this is something you would use a macro to do the second question.
I have a spreadsheet of a list of cards in a card game I play on the PC. So this leads to two questions.
1) Column E is for legendaries. If the column value = 1, then I want the row to be filled a certain color. So IE: row 2, columns A, B, C,D,E all filled with orange.
2) How can I create a text link that will filter anything with a value in column E? Column E is only going to ever contain a "1" if it's present. I want to filter out all the values that are not one. Then how would I clear it?
You can download my Excel workbook if you wish from the following link: https://drive.google.com/file/d/0B0x25Dj52eXBT1dlSFE1YjBXV0k/edit?usp=sharing
Thanks in advance for any help.
For the first question, just use conditional formatting. Select your entire sheet, go to the Home ribbon, click "Conditional Formatting", then click "New Rule." Under "Rule Type," select "Use a formula to determine which cells to format". In the formula box, enter =$E1=1, then click "Format" to edit what you want those rows to look like. Hit "OK" and now all rows where E=1 should be changed.
As for the second question, the simplest way would be to select your header row, then go to the Data ribbon and click "Filter." The when you want to see your legendaries grouped together, simply click the drop-down arrow on column E's header and click "Sort Largest to Smallest." This way you can also sort by the other columns if you want (name, ID, whatever).
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.
I need a formula that is beyond me and my Excel skills, I need to insert the number of times a match is found in column A into column C and then insert the total number of days for that person in column D. Can anyone help?
In cell C2:
=COUNTIF(A$2:A$6,A2)
In cell D2:
=SUMIF(A$2:A$6,A2,B$2:B$6)
See also:
COUNTIF
SUMIF
Have you considered using a pivot table? It's a little bit overkill but greatly simplifies what you want to do. Assuming your using Excel 2007:
Select the range of data including column labels.
Go to Insert->[Tables]->PivotTable.
In the dialog box that appears, select Existing Worksheet, choose a cell a click OK.
At this point, the PivotTable pane appears with your field names in one box and four other labeled boxes below.
Drag Name to the Row Labels box.
Drag Name to the Values box.
Drag Days to the Values box.
You're done!