![]() |
|
#9
|
||||
|
||||
|
Nice! Two ideas, Barbara:
1) Even if you'd wanted to keep the helping column (I'm not suggesting it), you could do it by just hiding it, either out to the right where no one would think to look or just making its column width 0. For my own use (I don't really like hidden columns, I like to be able to double check), I often color the whole sheet grey and then restore normal color for the non-helping columns I'm using at the left; it helps keep the eye focused away from the helping columns at the right. But for management types, hiding them may be better—and your idea of doing without helping columns entirely is probably better still, when possible. 2) When there is no data—no check-in time—the formula's result is 0, which your worksheet is displaying as "12:00 AM". Your solution is ingenious; I don't think I'd have thought of that. Pecoflyer's formula fixes it another way. But for my money it's probably simpler still to keep his original solution and use a formatting code that displays 0 values as either blanks, as his suggested "NA" or as anything else you choose. If you're never made up your own formatting codes, they're not hard. Try this: a) Examine the format of one of the tbl_Employee cells that displays that 0 value as "12:00 AM". I presume the format Category is "Time" and the Type is "1:30 PM". b) Now click on "Custom" at the bottom of the Category list; Excel shows you the format code for that standard setting. Yours might say "h:mm AM/PM;@"; I don't know why, but mine says "[$-409]h:mm AM/PM;@". In any case, make one small change: Add a semicolon to the end of the string. c) Hm, wait a minute; mine claims that Microsoft Excel cannot use that format string. Ok, forget the fancy stuff (I didn't know why it wanted an ampersand in that position anyway) and change it to "h:mm AM/PM;-General;". I'll explain below. d) Ok, now click OK and look at the results. The cells that should be empty now appear to be. This has the additional advantage of not needing to change Pecoflyer's original solution, without the IF function; I expect it's faster to run, as a result, but I haven't tested it to see. --- So what did the pieces of that format string mean? Excel format strings come in four semicolon-delimited parts:
Code:
h:mm AM/PM;-General;"NA" |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lookup | angie.chang | Excel | 1 | 07-27-2012 09:45 PM |
| Sorting by certain criteria | randenius | Excel | 2 | 06-11-2012 02:18 AM |
Possible Lookup
|
Karen222 | Excel | 3 | 01-10-2012 05:41 AM |
LookUp
|
aztiguen24 | Excel | 5 | 05-24-2011 03:57 AM |
Countif with 2 criteria
|
ibrahimaa | Excel | 3 | 05-23-2011 11:23 AM |