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

Dan

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

Not to sure what you want but does this do it. =IF(B1="","",H2)

Place this in A1 and copy down.

HTH

John

Yes, that works. I figure it out . Thank you.

You're welcome

John

John

**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.