+ Reply to Thread
Results 1 to 2 of 2

HELP PLS! Attempting to search a 2nd workbook and return 2cells content based on row num.

  1. #1
    Forum Contributor
    Join Date
    10-07-2013
    Location
    Wilts, England
    MS-Off Ver
    Excel 2013
    Posts
    100

    HELP PLS! Attempting to search a 2nd workbook and return 2cells content based on row num.

    Hi all,
    Sorry for the non-descript title but I can't think how best to describe the problem with the character cap. I've posted this once before, but prehaps due to my poor title haven't got any responses as yet.
    My problem is I'm trying to write a VBA script that using the content of a cell specified in my script, the script searches through a specified workbook. Once it's found a matching value the script uses the found row number and using set column letters, the script returns the values of 2 cells to specified cell numbers in the active sheet.
    I've also tried a VLOOKUP calculation but to no avail.

    =IF(ISNA(VLOOKUP(E3,'C:\Documents and Settings\Scripting\[Efficiency modelT.xls]Sheet2'!$A$4:$A$75,5,))=FALSE,"Value Not Found",VLOOKUP(E3,'C:\Documents and Settings\Scripting\[Efficiency modelT.xls]Sheet2'!$A$4:$A$75,5,))

    What I have so far for the VBA script is a messy attempt to re-purpose a script I use to search through a folder and add hyperlinks to the relevant files. But I'm new to VBA so am a little lost.
    Any help would be greatly appreciated.
    THANK YOU
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-07-2013
    Location
    Wilts, England
    MS-Off Ver
    Excel 2013
    Posts
    100

    Re: HELP PLS! Attempting to search a 2nd workbook and return 2cells content based on row n

    Just to update I solved this issue by using and INDEX calc instead of a VLOOKUP.

    =IF(ISNA(INDEX('C:\Documents and Settings\[model.xls]Sheet2'!$E$4:$E$75,MATCH(B2,'C:\Documents and Settings\[model.xls]Sheet2'!$A$4:$A$75,0))),"",INDEX('C:\Documents and Settings\[model.xls]Sheet2'!$E$4:$E$75,MATCH(B2,'C:\Documents and Settings\[model.xls]Sheet2'!$A$4:$A$75,0)))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Attempting to define content in cell based on update of other cell in same row.
    By ychartra01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-04-2013, 07:04 PM
  2. Search for specific value in a row, then return content og adjacent cell
    By linaudio in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-20-2013, 09:11 AM
  3. Attempting to return a unique value from a list based on multiple rankings.
    By HockeyZ39 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-24-2012, 12:38 AM
  4. Search...Return...give info based on the return address
    By deek1004 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2012, 03:36 PM
  5. copying cell content into a specific workbook based on the content in that cell
    By krishna reddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2012, 03:52 AM

Tags for this Thread

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