Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob
I believe this will give you what you are after Change sheet names to suit Sheet 1 must have an entry in it eg headers change wS2 range to suit Sub dddd() Dim c As Range Dim r As Long Dim wS2 As Worksheet Dim wS1 As Worksheet Set wS1 = Sheets("sheet1") Set wS2 = Sheets("sheet2") If wS1.FilterMode Then wS1.ShowAllData If wS2.FilterMode Then wS2.ShowAllData For Each c In wS2.Range("g1:g100") If Not IsEmpty(c) Then ' will error here if nothing exists in wS1 r = wS1.Cells.Find(what:="*", _ SearchOrder:=xlByRows, _ SearchDirection:=xlPrevious).Row + 1 wS1.Cells(r, 1).Value = wS2.Cells(c.Row, 1).Value wS1.Cells(r, 2).Value = wS2.Cells(c.Row, 3).Value End If Next c End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro that isn't working | Excel Discussion (Misc queries) | |||
MACRO IS NOT WORKING AS IT SHOULD | Excel Worksheet Functions | |||
Don't want to SEE macro working | Excel Programming | |||
macro not working on 1 PC, ok on others | Excel Programming | |||
Macro not working | Excel Programming |