How can I assign a 0 for all negative values, and 1 for all positive values?

Copper Contributor

Hello all, I'm trying to figure out a way to assign a 0 for all negative values/times in a column, and a 1 for all positive values/times in the same column. I know that I could somehow do it with an IF function, but I don't know how to write the logic test for that. Any help is appreciated! Here's a sample of what I need to make happen on the bottom:

 

Column A (Original)                        Column B (What I need)

67:20:19                                              1

-22:30:12                                             0

00:01:00                                              1

-00:00:01                                             0

2 Replies

@andyhe74 

How do you keep negative time? Most probably there are texts in column A. In general

=--(LEFT(A1)<>"-")

shall work.