Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format a column to always show PM 1

Status
Not open for further replies.

gray78

Programmer
Feb 3, 2005
78
US
Hello,

I have a spread sheet with one column is always PM, is there a way I can format this column that when I put a time in (5:00) it comes up as 5:00 PM?

Thanks
 
In a word, no.

But what you can do is add a formula in the column next to it.

Let's say that your times are in column A. In B2 (accounting for a row of headers), type in [COLOR=blue white]=if(a2<.5,a2+.5,a2)[/color]

Format column b as time.

[tt]_____
-John
[/tt]Help us help you. Please read FAQ181-2886 before posting.
 
Anotherhiggins,

That was great! Thanks. Now that i put the formula in and dragged it down the column, if I leave the times column blank the time of 12:pm shows up. Is there a way for the formula column to be blank if not value is in the time column.

Thanks again
 
Sure. Adding a second IF will take care of it. This is a great way to keep spreadsheets looking clean if they contain lots of formulas.

[COLOR=blue white]=if(a2="","",if(a2<.5,a2+.5,a2))[/color]

[tt]_____
-John
[/tt]Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top