View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Programming for column shift


.....
If IsNumeric(cell.offset(0,2).value) Then
.....

The "=True" is not required here.

Or just change "A" to "C" in your for loop range.
--
Tim Williams
Palo Alto, CA


"Jerry Foley" wrote in message ...
Given the routine below, how can I have the macro seach column c of each
worksheet and if there is a numeric value in that cell copy the entire row to
another sheet (sheet2) and continue to search ?
Sub numbers()

Dim ws As Worksheet, cell As Range, rng As Range

For Each ws In ThisWorkbook.Worksheets
If Not ws.Name = "Sheet2" Then
For Each cell In ws.Range("A1:A" & ws.Range("A65536").End(xlUp).Row)
If IsNumeric(cell) = True Then
cell.EntireRow.Copy _
Sheets("Sheet2").Range("A65536").End(xlUp).Offset( 1, 0)
End If
Next cell
End If
Next ws

End Sub