if statement

H

hotlh

Hi there,
I have a workbook that gives me information with time in 24hr clock and what
l alo have is a list of of numbers that l want to match as close as possibleo
each time. example
list of numbers to choose from
06:00 230
07;00 231
08:00 232
So what l am trying to do is if 06;00 equals 230 then put in 230 into column
whatever
then 07:00 would have to equal 231
then 08;00 would have to be 232 and so on
it will always equal a number referenced of the side numbers so there will
be no false statement.
what l have done is =if(f:f<300,"230"),(g:g)
l want it to put the information back into column G. So what l am trying to
say is if <300 make it 230 and return it to column G. then for the next one l
have done is
=if(f:f>0700,"231"),(g:g) if greater than 0700 make it 231. Can l do this at
all as l have value written in column G? Thanks chris
 
D

David Biddulph

Are your values in the first column (and the values with which you are
comparing them) Excel times, or text values, or a mixture?
In your message you've got a mixture of formats such as 06;00 and 06:00.
Excel times should be 06:00. If you want to compare with 06:00 you can
either use TIME(6,0,0) or --"06:00".

Your syntax for the IF function is wrong. Look in Excel help at the syntax.
Remember also that a formula won't return a value for a column, but a value
for a cell. You can then copy that formula to other cells in the column if
you so wish.

You may also need to be more careful with your comparison formulae, as to
whether you want < or <=, and similarly > or >=. Think about what you want
the formula to give if the values aree equal.
 
B

Bob Phillips

Here is a suggestion

=INDEX(B:B,ROUNDUP(A1*24,0))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top