PC Review


Reply
Thread Tools Rate Thread

Programming for column shift

 
 
=?Utf-8?B?SmVycnkgRm9sZXk=?=
Guest
Posts: n/a
 
      26th Feb 2007
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


 
Reply With Quote
 
 
 
 
Tim Williams
Guest
Posts: n/a
 
      26th Feb 2007

.....
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" <(E-Mail Removed)> wrote in message news:42141B71-4DB6-4FD3-B73D-(E-Mail Removed)...
> 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

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cntl-Shift-Select & Shift-Select Not Working in Office 2000 Apps =?Utf-8?B?Sm9l?= Windows XP General 0 2nd Feb 2005 03:45 PM
Shift 2 prints @ & shift ' prints", not what's shown on keys. Can. =?Utf-8?B?dDFtazg=?= Microsoft Word Document Management 2 6th Nov 2004 04:31 AM
Shift " and shift @ keys are mixed. Why me???? =?Utf-8?B?U2FtYWdlZDEy?= Microsoft Word Document Management 2 5th Oct 2004 06:16 AM
RE: SHIFT and 2 gives me @ sign on UK keyboard. Also, SHIFT and ' giv =?Utf-8?B?R3JlZyBQYWxtZXI=?= Windows XP Help 0 25th Aug 2004 07:35 PM
Re: SHIFT and 2 gives me @ sign on UK keyboard. Also, SHIFT and ' giv John Wright Windows XP Help 0 25th Aug 2004 07:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:06 PM.