Related:
- Copy entire row from one tab into another
- Saints row 2 cheats - Guide
- Java update tab missing - Guide
- Opera incognito tab - Guide
- How to delete a row in a table in word - Guide
- Samsung galaxy tab lock screen while watching video - Guide
1 response
Ivan-hoe
Posts
433
Registration date
Saturday February 16, 2008
Status
Member
Last seen
October 17, 2008
110
Sep 9, 2008 at 02:35 AM
Sep 9, 2008 at 02:35 AM
Hello Christian,
Please copy here the macros you used and afterwards we'll try to see what goes wrong in them.
Ivan
Please copy here the macros you used and afterwards we'll try to see what goes wrong in them.
Ivan
Oct 16, 2008 at 09:45 AM
I'm trying to do something almost exactly the same as Christian above, but I wouldn't want to delete the orginal line of data I'm copying from and I haven't begun to write a macro for it yet as I'm not very good with it. I've been looking for help for this one for some time now and haven't been able to get any. Can you help please?
Thanks!
Nov 3, 2008 at 02:35 PM
Here is my code. I am looking to search for a row in worksheet 2 corresponding to a value entered in worksheet 1. If the value matches, it will copy the rows to worksheet 1. So far I discovered that while debugging it does search right; but is unable to copy. Can you please help me?
Sub Value_Proposition_NewSearch()
'
' Value_Proposition_NewSearch Macro
'
'
Dim wksTarget As Worksheet, wksSource As Worksheet
Dim rngTarget As Range, rngSource As Range, rngID As Range
Dim iD As String
Set wksTarget = ThisWorkbook.Sheets("Menu")
Set wksSource = ThisWorkbook.Sheets("ValuePropositionData")
Set rngID = wksTarget.Range("a24")
'clear any old data on summary sheet
Set rngTarget = rngID.SpecialCells(xlCellTypeLastCell)
If rngTarget.Row > rngID.Row Then
wksTarget.Range(rngID.Offset(1), rngTarget).EntireRow.ClearContents
End If
'matching rows will get copied to summary sheet starting row 3
Set rngTarget = rngID.Offset(25)
'find matching rows on address sheet starting row 2
Set rngSource = wksSource.Range("a9")
iD = rngID.Value
Do Until (rngSource.Value = "")
If rngSource.Value = iD Then
Application.CutCopyMode = True
rngSource.EntireRow.Copy
wksTarget.Paste rngTarget
Application.CutCopyMode = False
Set rngTarget = rngTarget.Offset(1)
End If
Set rngSource = rngSource.Offset(1)
Loop
End Sub
Apr 16, 2010 at 12:07 AM