LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Loop through table of columns and rows

Iam trying to create a loop that searches through a table of columns
and rows to zero and negative values. My columns portion of the code
is causing an error. How should I change the code to have it work
properly.

Sub Search()
LastColumn = "R"
NewColumnCount = "F"
For ColumnCount = NewColumnCount To LastColumn
LastRow = 54
NewRowCount = 38
For RowCount = NewRowCount To LastRow
If Range(ColumnCount & RowCount) < 0 Then
Range(ColumnCount & RowCount) = 0
NewRowCount = NewRowCount + 2
End If
Next RowCount
NewColumnCount = NewColumnCount + 2
Next ColumnCount
End Sub

Frank
 
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
Rows to columns in a table or pivot table Jesper Audi Excel Discussion (Misc queries) 4 November 3rd 09 07:00 PM
how to interchange rows to columns & columns to rows in a table kotakkamlesh Excel Discussion (Misc queries) 1 July 10th 06 07:58 AM
Loop through columns and then rows Sunryzz Excel Programming 8 December 23rd 04 03:13 PM
Addition of rows in table with loop desmondleow[_14_] Excel Programming 3 January 13th 04 03:21 PM
How do I delete rows and columns in With With End Loop? Bob Benjamin Excel Programming 3 November 16th 03 12:26 AM


All times are GMT +1. The time now is 06: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"