LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
RaY RaY is offline
external usenet poster
 
Posts: 164
Default looping thru rows

POSTED: SEARCH - LOOPING, IN EXCEL PROGRAMMING

Hello,

I am trying convert a value of one column (col 12 is value) to negative if
the value in another column (col 10 is cs qty) is negative. The result would
update to column 14 as - or + value.

The function below works but I cant get it to loop thru the entire rows. The
amount of records changes daily. I am trying to loop this using do until but
I cant get it to work. Would you please show me how to get this to loop thru
the entire rows?

Function Z_UpdateCell()

If Worksheets("ListofDiff").Cells(2, 10) < 0 Then
Worksheets("ListofDiff").Cells(2, 14) = -(Cells(2, 12))
Else: Worksheets("ListofDiff").Cells(2, 14) = (Cells(2, 12))
End If


End Function

thanks, ray
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
looping to through rows [email protected] Excel Programming 1 August 17th 07 01:59 AM
looping through columns and rows Guerilla Excel Programming 4 March 22nd 07 09:31 PM
looping through rows and columns mattguerilla Excel Discussion (Misc queries) 1 March 20th 07 05:14 PM
Not looping through rows bg18461[_18_] Excel Programming 2 August 4th 06 04:35 PM
Looping through Columns then Rows JCP Excel Programming 3 October 30th 05 04:27 AM


All times are GMT +1. The time now is 11:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"