Results 1 to 4 of 4

Match on Rows and Columns &Copy/Paste-VBA code

Threaded View

  1. #1
    Registered User
    Join Date
    04-04-2012
    Location
    Tucker, Georgia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Match on Rows and Columns &Copy/Paste-VBA code

    Upload values based on matching Rows and Columns***I am using 2 worksheets-trying to write a two way lookup logic in VBA.. Currently I am using a Vlookup to match
    1st worksheet is the template= called the “template”
    2nd worksheet contains the data= data
    Objective- Copy data from worksheet 2, where values are the same in the worksheet 1(template), must match on rows and column headers…
    If there is no match, insert the value of “0”in Worksheet 1
    If there is a matching value, copy the “$ value” from worksheet 2 (data) and paste it in worksheet 1(template)
    Hence, I am copying data from worksheet 2 (data) and pasting the data in worksheet 1
    Here is the VBA code that I have so far…Please help
    Sub vbVlookup()
    Range("A3").Formula = "=vlookup(A3,'!Data'!$A$3:$I$16,match(B3,$B$2:I$2$,0)+1,False)"
    Range("A3").Value = Range("A3").Value
    Range("B3").Value = Range("B3").Value
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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