Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Copy rows from Sheet1 to Sheet2 when Column B values equal "X" andColumn C values 100

How do I copy rows (Columns A,B,D only, values only) from Sheet1 to
Sheet2, same workbook.
when Column B values equal "X" and Column C values 100.
Help appreciated
J.P.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Copy rows from Sheet1 to Sheet2 when Column B values equal "X"and Column C values 100

On Jun 21, 5:38*pm, u473 wrote:
How do I copy rows (Columns A,B,D only, values only) from Sheet1 to
Sheet2, same workbook.
*when Column B values equal "X" and Column C values 100.
Help appreciated
J.P.


Sub SAS_CopyValuesIF()
Dim r As Double
Dim i As Long
r = 16 'start row on destination sheet
For i = 1 To Cells(Rows.Count, "b").End(xlUp).Row
If UCase(Cells(i, 2)) = "X" And Cells(i, 3) 100 Then
Sheets("sheet4").Cells(r, 1).Value = Cells(i, 1).Value
Sheets("sheet4").Cells(r, 2).Value = Cells(i, 2).Value
Sheets("sheet4").Cells(r, 3).Value = Cells(i, 4).Value
r = r + 1
End If
Next i
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Copy rows from Sheet1 to Sheet2 when Column B values equal "X"and Column C values 100

Thank you,
Well appreciated,
J.P.
Reply
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
Copy Rows Multiple times "changing" values in one column EE[_2_] Excel Programming 4 October 12th 07 11:32 AM
how do copy "sheet1!A1+1 in sheet2 to sheet 3 and get "sheet2!A1+ Dany Excel Discussion (Misc queries) 5 April 16th 07 03:27 AM
Cut rows if contains "Done" from sheet1, and paste onto next available row in sheet2 in the same workbook. Steven Excel Programming 3 November 17th 05 08:04 AM
Copy values from Sheet1 to Sheet2 Eintsein_mc2 Excel Discussion (Misc queries) 1 January 6th 05 05:02 AM
Copy values only, sheet1 to sheet2 without Selection Robert Christie[_3_] Excel Programming 4 October 20th 04 02:05 PM


All times are GMT +1. The time now is 04:08 PM.

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

About Us

"It's about Microsoft Excel"