Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default Transfer entire row to another sheet

i want to do the following

In sheet1 ,if A1="ABC" transfer entire row1 data to sheet2
or if A1="DEF" transfer entire row1 data to sheet 3

similarly do for A2,A3,A4,A5...... cell of sheet1 and transfer data to
sheet 2 or sheet 3

thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Transfer entire row to another sheet

Sub transferrowif()
For Each c In sheets("sheet1").Range("a1:a21")

If LCase(c) = "abc" Then
With Sheets("sheet2")
dlr = .Cells(Rows.Count, 1).End(xlUp).Row + 1
c.EntireRow.Copy .Cells(dlr, 1)
End With

ElseIf LCase(c) = "def" Then
With Sheets("sheet3")
dlr = .Cells(Rows.Count, 1).End(xlUp).Row + 1
c.EntireRow.Copy .Cells(dlr, 1)
End With
End If
Next c

End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"aditya" wrote in message
...
i want to do the following

In sheet1 ,if A1="ABC" transfer entire row1 data to sheet2
or if A1="DEF" transfer entire row1 data to sheet 3

similarly do for A2,A3,A4,A5...... cell of sheet1 and transfer data to
sheet 2 or sheet 3

thanks in advance


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
transfer entire row in sheet 2 aditya New Users to Excel 2 June 2nd 09 03:12 PM
transfer entire row to another sheet aditya Excel Discussion (Misc queries) 2 May 25th 09 01:35 PM
transfer contents from a cell in previous sheet if the sheet is a DarkNight New Users to Excel 1 September 9th 08 01:04 AM
How to Automatically transfer specific Data from Sheet 1 to Sheet Jman Excel Worksheet Functions 12 May 10th 07 05:35 AM
Transfer/Copy Sheet, Dynamically linked Sheet 0-0 Wai Wai ^-^ Excel Discussion (Misc queries) 2 December 23rd 05 10:04 PM


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