Solved: Macro to sum 3 columns using a loop

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

TrauTs-Art

Thread Starter
Joined
Jan 19, 2013
Messages
3
Hi All, fantastic site.

I need to run a macro in excel to sum the following.

check row 3 col 3 or row 3 col 4 for a value > 0 then subtract this value from row 3 col 5 return answer to Row 3 col 6 if col 5 cell is empty then go to previous cell that has a value >0 return this value to Col 6 on the same row as col 3 or 4 (the one with a value >0)
There should be an answer in every row col 6 this could run upto 100 rows+

Hopefully i've explained myself engough for you to understand. Ta
 

TrauTs-Art

Thread Starter
Joined
Jan 19, 2013
Messages
3
I have place the formula in column F row 2 dragged it down and all I get is "false" nice trt but that did not seam to work.

My problem starts at row 5.

I have data in colC row 4 & 5, col D row 3 , 6, 7 colE row 2,3,6 allthe remaining in between are zero. Starting with col F row 3 the formula I've entered is = E2-D2 then moving down to the next cell same column row 4 the formula is =E3-C4, then moving down to the next cell I have E3-C5 as you can see I have to go back to E3 becouse E4 = 0 also does E5 so on and so on. What I 'm looking to achieve is when column E has a zero then the previous cell that is >0 needs to be used however the sequence needs to remain eg E6 E7 E8 as there will always be a value >0 in column 5.

Thanks for your efforts
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top