Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Monday, August 12, 2013 1:37:35 AM UTC-7, Claus Busch wrote:
Hi Howard, Am Mon, 12 Aug 2013 01:22:52 -0700 (PDT) schrieb Howard: The part it does not do is there are no cell address' in column K of the "found column A item". sorry, I did not read carefully. Try: Sub ListHeader2() Dim lngLstRow As Long Dim rngA As Range Dim c As Range Dim firstaddress As String Dim i As Long i = 1 With Sheets("Sheet2") lngLstRow = .UsedRange.Rows.Count For Each rngA In .Range("A2:A" & lngLstRow) Set c = .Range("B2:F7").Find(rngA, _ LookIn:=xlValues, after:=.Range("F7")) If Not c Is Nothing Then firstaddress = c.Address Do .Cells(i, "J") = .Cells(1, c.Column) .Cells(i, "K") = c.Address i = i + 1 Set c = .Range("B2:F7").FindNext(c) Loop While Not c Is Nothing And c.Address < firstaddress End If Next End With End Sub Regards Claus B. Very nice, and with the cell address' it is easy see to the lookup order, which is, of course, is as you have said. The order is not important, but thanks for taking the time enlighten me. Thanks again. Regards, Howard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro is to update column 13 and 14 of worksheet "Voice BB Pending"as per column 2 and 3 of "Activity log" . | Excel Programming | |||
find "Cancellation" in column "A" and copy all data from Columns B-F onto another Sheet | Excel Programming | |||
how can I count if column A="active" and column E="Job" in a list? | Excel Worksheet Functions | |||
Copying by Column "Header Name" macro | Excel Programming |