Results 1 to 3 of 3

VBA Match To Column & Cell and Copy

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    VBA Match To Column & Cell and Copy

    Hi I wonder whether someone could possibly help me please.

    I'm trying to put together a short script which performs the following:

    • Compare column D on the "All Resources" sheet with column B on the "WA - Platform" sheet.
    • Where the names match, then compare column G on the "All Resources" sheet with cell "B3" on the "WA - Platform" sheet.
    • Then once these match, copy the value from column H on the "All Resources" sheet and paste on the relevant row in column D on the "WA - Platform" sheet.

    From some guidance I've received before I've put together the following, but I can't seem to create the second and third match:

    Sub Signals()
        
        Dim dic As Object
        Dim Dn As Range
        Dim rng As Range
        
        Application.ScreenUpdating = False
            
        With Sheets("All Resources")
            
            Set rng = .Range(.Range("D8"), .Range("D" & Rows.Count).End(xlUp))
        End With
        
        Set dic = CreateObject("scripting.dictionary")
        dic.comparemode = vbTextCompare
        For Each Dn In rng
            Set dic(Dn.Value) = Dn
        Next
        
        With Sheets("WA - Platform")
            
            Set rng = .Range(.Range("B8"), .Range("B" & Rows.Count).End(xlUp))
        End With
    End Sub
    I appreciate that my description may not be enough, so I've attached a file to illustrate the file.

    I just wondered whether someone may be able to look at this please and offer some guidance on how I may go about achieving this.

    Many thanks and kind regards

    Chris
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to match cell value on two wooksheet copy data on another column on row back to 1st
    By JDC_8 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2013, 08:39 PM
  2. Replies: 1
    Last Post: 02-15-2013, 08:17 AM
  3. Replies: 3
    Last Post: 01-04-2013, 10:06 AM
  4. Replies: 1
    Last Post: 01-03-2013, 11:03 AM
  5. Replies: 1
    Last Post: 07-01-2011, 07:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1