+ Reply to Thread
Results 1 to 2 of 2

VLOOKUP doubt

  1. #1
    Registered User
    Join Date
    06-22-2007
    Posts
    1

    VLOOKUP doubt

    I have two sheets Sheet1 and Sheet2.

    In sheet Sheet1, column A is a concatenation of columns B and C.
    In sheet Sheet2, again, column A is a concatenation of columns B and C.

    For each cell in Sheet2!ColumnA, I want to check if the value exists in Sheet1!ColumnA, and if there is a match I want to retrieve the value from the Column D of the same row from Sheet1.

    I tried doing this with the following code:
    Please Login or Register  to view this content.

    But since this code retrieves the value from the column A of both the sheets as a formula =A2&B2, I am getting the return value as 0.

    I tried RC[-3].Value, but got some error.

    I am new to excel macro. Can somebody help me fixing this issue. Thanks in advance.
    Last edited by VBA Noob; 06-23-2007 at 04:38 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Much better to use the .Find & .Findnext methods in VBA, look at the Help example in the VBA help files.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

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