VBA Code needed look up data from one sheet and pasting on another sheet

k03074

Board Regular
Joined
Mar 28, 2013
Messages
57
Hello,

Here is my problem that I can't find a solution for, I looking for VBA code that will search for sheet 1, column E (Dock Assignment) and match it to sheet 2, column A4 or F4 or K4 or P4 and if found then copy Sheet 1 Column A row that matches dock to Sheet 2 either column A, F, K or P. Then repeat to Column B and C (Sheet 2) from data from Sheet 1.

Here is my data from sheet 1

[TABLE="width: 505"]
<tbody>[TR]
[TD="width: 93, bgcolor: transparent"]Customer

[/TD]
[TD="width: 138, bgcolor: transparent"]Expect Time IN
[/TD]
[TD="width: 152, bgcolor: transparent"]Expect Time Out
[/TD]
[TD="width: 130, bgcolor: transparent"]Description
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock Assignment
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 1
[/TD]
[TD="width: 138, bgcolor: transparent"]16:45
[/TD]
[TD="width: 152, bgcolor: transparent"]17:45
[/TD]
[TD="width: 130, bgcolor: transparent"]SCAC TR4N
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 2
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 2
[/TD]
[TD="width: 138, bgcolor: transparent"]3:00
[/TD]
[TD="width: 152, bgcolor: transparent"]4:00
[/TD]
[TD="width: 130, bgcolor: transparent"]SCAC KRMX
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 15
[/TD]
[TD="width: 138, bgcolor: transparent"]6:00
[/TD]
[TD="width: 152, bgcolor: transparent"]7:00
[/TD]
[TD="width: 130, bgcolor: transparent"]TNAP 02462 (Dock 5C) SCAC AUBA
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 12
[/TD]
[TD="width: 138, bgcolor: transparent"]8:45
[/TD]
[TD="width: 152, bgcolor: transparent"]9:30
[/TD]
[TD="width: 130, bgcolor: transparent"]SCAC HLGI--Pool 00143
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 6
[/TD]
[TD="width: 138, bgcolor: transparent"]11:00
[/TD]
[TD="width: 152, bgcolor: transparent"]12:00
[/TD]
[TD="width: 130, bgcolor: transparent"] SCAC WKTH CT/PAT
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 4s
[/TD]
[TD="width: 138, bgcolor: transparent"]12:00
[/TD]
[TD="width: 152, bgcolor: transparent"]13:00
[/TD]
[TD="width: 130, bgcolor: transparent"]CANAL
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 8
[/TD]
[TD="width: 138, bgcolor: transparent"]14:00
[/TD]
[TD="width: 152, bgcolor: transparent"]14:30
[/TD]
[TD="width: 130, bgcolor: transparent"] 09126G (GS / GEIB)
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 3
[/TD]
[TD="width: 138, bgcolor: transparent"]15:30
[/TD]
[TD="width: 152, bgcolor: transparent"]16:30
[/TD]
[TD="width: 130, bgcolor: transparent"] SCAC GUOO (ALL PLANTS---except 48065/48075)
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 11
[/TD]
[TD="width: 138, bgcolor: transparent"]18:00
[/TD]
[TD="width: 152, bgcolor: transparent"]19:00
[/TD]
[TD="width: 130, bgcolor: transparent"][/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 31
[/TD]
[TD="width: 138, bgcolor: transparent"]23:00
[/TD]
[TD="width: 152, bgcolor: transparent"]23:59
[/TD]
[TD="width: 130, bgcolor: transparent"]18171 (23:00-23:59) SCAC SYFN
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 12
[/TD]
[TD="width: 138, bgcolor: transparent"]23:00
[/TD]
[TD="width: 152, bgcolor: transparent"]0:00
[/TD]
[TD="width: 130, bgcolor: transparent"]SCAC RHT PU Sunday night
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 3
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 7
[/TD]
[TD="width: 138, bgcolor: transparent"]9:35
[/TD]
[TD="width: 152, bgcolor: transparent"]10:25
[/TD]
[TD="width: 130, bgcolor: transparent"]RTE SRCE-01
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 4
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 5
[/TD]
[TD="width: 138, bgcolor: transparent"]11:30
[/TD]
[TD="width: 152, bgcolor: transparent"]12:00
[/TD]
[TD="width: 130, bgcolor: transparent"] ROUTE M7018 (PSKL / C/ DDCS) ALL ASSEMBLY PLANTS
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 4
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 23
[/TD]
[TD="width: 138, bgcolor: transparent"]14:00
[/TD]
[TD="width: 152, bgcolor: transparent"]14:30
[/TD]
[TD="width: 130, bgcolor: transparent"] 48065 SCAC CMFH
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 4
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 18
[/TD]
[TD="width: 138, bgcolor: transparent"]15:00
[/TD]
[TD="width: 152, bgcolor: transparent"]16:00
[/TD]
[TD="width: 130, bgcolor: transparent"]48075 T1XX SCAC GEIB
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 4
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 6
[/TD]
[TD="width: 138, bgcolor: transparent"]16:00
[/TD]
[TD="width: 152, bgcolor: transparent"]17:00
[/TD]
[TD="width: 130, bgcolor: transparent"]SCAC WKTH CT/PAT
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 4
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 10
[/TD]
[TD="width: 138, bgcolor: transparent"]19:30
[/TD]
[TD="width: 152, bgcolor: transparent"]20:30
[/TD]
[TD="width: 130, bgcolor: transparent"]MILKRUN SCAC CNAL
[/TD]
[TD="width: 159, bgcolor: transparent"]Dock 4
[/TD]
[/TR]
[TR]
[TD="width: 93, bgcolor: transparent"]Customer 1
[/TD]
[TD="width: 138, bgcolor: transparent"]1:00
[/TD]
[TD="width: 152, bgcolor: transparent"]2:00
[/TD]
[TD="bgcolor: transparent"]SCAC TR4N
[/TD]
[TD="bgcolor: transparent"]Dock 5

[/TD]
[/TR]
</tbody>[/TABLE]

And Sheet 2

[TABLE="width: 1072"]
<tbody>[TR]
[TD="width: 391, bgcolor: transparent, colspan: 5"]Dock 2
[/TD]
[TD="width: 341, bgcolor: transparent, colspan: 5"]Dock 3
[/TD]
[TD="width: 349, bgcolor: transparent, colspan: 5"]Dock 4
[/TD]
[TD="width: 347, bgcolor: transparent, colspan: 5"]Dock 5
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Customer
[/TD]
[TD="width: 97, bgcolor: transparent"]Expected Arrived Time
[/TD]
[TD="width: 81, bgcolor: transparent"]Departure Time
[/TD]
[TD="bgcolor: transparent"]Time In
[/TD]
[TD="bgcolor: transparent"]Time Out
[/TD]
[TD="bgcolor: transparent"]Customer
[/TD]
[TD="width: 93, bgcolor: transparent"]Expected Arrived Time
[/TD]
[TD="width: 81, bgcolor: transparent"]Departure Time
[/TD]
[TD="width: 55, bgcolor: transparent"]Time In
[/TD]
[TD="width: 40, bgcolor: transparent"]Time Out
[/TD]
[TD="bgcolor: transparent"]Customer
[/TD]
[TD="width: 103, bgcolor: transparent"]Expected Arrived Time
[/TD]
[TD="width: 79, bgcolor: transparent"]Departure Time
[/TD]
[TD="width: 55, bgcolor: transparent"]Time In
[/TD]
[TD="width: 40, bgcolor: transparent"]Time Out
[/TD]
[TD="width: 74, bgcolor: transparent"]Customer
[/TD]
[TD="width: 90, bgcolor: transparent"]Expected Arrived Time
[/TD]
[TD="width: 88, bgcolor: transparent"]Departure Time
[/TD]
[TD="width: 55, bgcolor: transparent"]Time In
[/TD]
[TD="width: 40, bgcolor: transparent"]Time Out
[/TD]
[/TR]
[TR]
[TD="width: 90, bgcolor: transparent"]Customer 1
[/TD]
[TD="width: 97, bgcolor: transparent"]16:45
[/TD]
[TD="width: 81, bgcolor: transparent"]17:45
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 74, bgcolor: transparent"][/TD]
[TD="width: 90, bgcolor: transparent"][/TD]
[TD="width: 88, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 93, bgcolor: transparent"][/TD]
[TD="width: 81, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 72, bgcolor: transparent"][/TD]
[TD="width: 103, bgcolor: transparent"][/TD]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]

Any suggestions would help and appreciate.

Thank you,
Gerald
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
How about
Code:
Sub k03074()
   Dim Cl As Range, Fnd As Range
   Dim Ky As Variant
   Dim Ws1 As Worksheet, Ws2 As Worksheet
   
   Set Ws1 = Sheets("Sheet1")
   Set Ws2 = Sheets("Sheet2")
   With CreateObject("Scripting.dictionary")
      For Each Cl In Ws1.Range("E2", Ws1.Range("E" & Rows.Count).End(xlUp))
         If Not .Exists(Cl.Value) Then
            .Add Cl.Value, Cl.Offset(, -4).Resize(, 3)
         Else
            Set .item(Cl.Value) = Union(.item(Cl.Value), Cl.Offset(, -4).Resize(, 3))
         End If
      Next Cl
      For Each Ky In .Keys
         Set Fnd = Ws2.Range("4:4").Find(Ky, , , xlWhole, , , False, , False)
         If Not Fnd Is Nothing Then
            .item(Ky).Copy Fnd.End(xlDown).Offset(1)
         End If
      Next Ky
   End With
End Sub
 
Upvote 0
Hello Fluff,

Thank you for you code here. Work like a charm. I would have never got this in a million years.

Thank you so much.

Cheers,
Gerald
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top