Microsoft Excel - If a cell = then - Asked By Dan on 02-Aug-11 06:19 AM

I am trying to create a loop, which I am not good at and still learning, to look at the first cell (B1) in column B:B to see if a value exists.  If a value exists then copy the value from H2 and put that value in the first cell (A1) in A;A and do this until no value exists in a cell to cell 500 in column B:B. help will be much appreciated.

Dan
John D replied to Dan on 02-Aug-11 09:12 AM
Hi Dan
Not to sure what you want but does this do it. =IF(B1="","",H2)
Place this in A1 and copy down.
HTH
John
Dan replied to John D on 02-Aug-11 09:34 AM
Yes, that works. I figure it out . Thank you.
John D replied to Dan on 02-Aug-11 09:38 AM
You're welcome
John
Radhika roy replied to Dan on 02-Aug-11 10:52 AM

The IF function is one of Excel’s most useful and most used functions. What it does, basically, is test to see whether a certain condition is true or false. If the condition is true, the function will do one thing, if the condition is false, the function will do something else.

The basic form or syntax of the function is:

=IF(logic test, value if true, value if false)

The logic test is always a comparison between two values. Comparison operators are used, for example, to see if the first value is greater than or less than the second, or equal to it.