cycle through list and put data found in col a into col d

A

april

sorry about the confusing subject title.

col a col b col c col d
account # debit
account # credit
journal reference

i want the journal reference to appear in col d rows 1 and 2. currently,
col d is empty. the rows do not always follow the pattern row 1 debit, row 2
credit. you can have 4 rows of debit and one row of credit

thank you in advance for your help.
 
J

Jim Thomlinson

You can do it without a macro...

Add this formula to cell D2 and copy down...
=IF(SUM(B2:C2)=0, A2,D3)

If you need to remove the reference lines that can be done...
 
A

april

Thanks, Jim but this doesn't work. i don't think that i explained myself
very well. i'll give this another try.

Col A Col B Col C Col D
Row 2 Food 96173
Row3 Cash 96173
Row 4 Ch. No. :003990
i want to put the desc found in Row 4, Col A in Rows 2 and 3 of column D.
the pattern is not always 2 rows. there could be 5 rows of debits and 1 row
of credits.
thank you in advance for your help--
aprilshowers
 
J

Jim Thomlinson

I must be missing something because that is what my formula is doing. With
your source data and a bit more of my own I get:

Food 96173 Ch. No. :003990
Cash 96173 Ch. No. :003990
Ch. No. :003990 Ch. No. :003990
This 12345 asdf
That 12345 asdf
Other 12345 asdf
asdf asdf

Perhaps you could show me what the output is supposed to look like if not
that.
 
A

april

My apologies, Jim. this works like a charm. makes me feel foolish for
spending so much time trying to work out a macro. just one more thing... how
do i get rid of those reference lines?

thanks for all your help.

by the way, do you know why i don't receive emails notifying me of replies
even though i have that box checked?
 
A

april

i think that i figured out how to get rid of the reference. copy/paste
values ccol d. the go to col e =if(sum(b2:c2)<>0,d2," ")
 
J

Jim Thomlinson

That is it...
--
HTH...

Jim Thomlinson


april said:
i think that i figured out how to get rid of the reference. copy/paste
values ccol d. the go to col e =if(sum(b2:c2)<>0,d2," ")
 

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