Excel Beginner - Need Help with Looping Operation

P

phoenixstar

Found this forum and figured it would be the best place to ask what i
probably considered an easy problem to solve for most of you.

Have a set of data that is 80 columns wide by 30 rows. I am performin
calculations on the data as such:

Starting at the bottom left (Cell A80 for basic reference purposes),
need to continue performing the calculuation to the right in that ro
until the value reaches 0 or below, then jump up to the row above fo
the next calculation. For instance, perform the calculation at A80
B80, C80, then when you reach D80, the value is less than 0, so yo
continue the calculation at D79, E79, F79, etc...

For the life of me, I have looked through the basic functions provide
in Excel, and can't figure out how to do this. Anybody have any ideas
Your help is very much appreciated
 
D

Don Guillett

Excel is capable of performing all calculations at once. Perhaps you need to
tell us a lot more.
 
J

Jack Schitt

Do you need it to overwrite the original data? Normally you would be happy
for it to do the calculation on that data but put the result somewhere else
in the workbook.
 
T

Trevor Shuttleworth

Something like:

Sub test()
i = 80
j = 1

Do Until i < 1 Or j > 30
If Cells(i, j) > 0 Then
'MsgBox Cells(i, j).Address & " " & Cells(i, j).Value
Debug.Print Cells(i, j).Address & " " & Cells(i, j).Value
j = j + 1
Else
i = i - 1
End If
Loop

End Sub

Regards

Trevor
 
Top