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: 2
Default Executing two statements in a for loop

Hey guys I am new at macos

I basically have a column with both numbers and blank cells (column H).
I am trying to recognize only the numbers and copy them in the adjacent
column one after another.
When the cell is actually a number, I would like to increment a counter
starting from cell i11.
If I try to add a second If statement in the for loop for the sole
purpose of incrementing the counter I get an error

here is the code:

Sub rechercheFinale2()
Dim cell As Range
Dim index As Integer
index = 11
For Each cell In Range("H11:H402")
If IsNumeric(cell.Value) = True Then
Worksheets("Sheet1").Rows(index).Columns(9).Value = cell.Value
index = index + 1
Next cell
End Sub



thank you guys

 
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
Too Many IF Statements Nesting Error (Excel Formula Loop w/o VBA) retailmessiah[_2_] Excel Worksheet Functions 7 February 10th 10 06:52 PM
Convert repetitive IF statements to array loop? bntringa[_4_] Excel Programming 5 January 27th 06 09:45 PM
Executing a subroutine from within a loop Jeff@DE Excel Programming 1 January 9th 06 10:04 AM
Need loop structure to get round limited IF statements karambos Excel Discussion (Misc queries) 5 August 30th 05 12:31 AM
Updating For Loop statements stuart Excel Programming 1 July 23rd 04 08:35 PM


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