+ Reply to Thread
Results 1 to 4 of 4

Trying to copy data from one workbook in another and return one field as result

  1. #1
    Registered User
    Join Date
    05-25-2016
    Location
    Munich, Germany
    MS-Off Ver
    Office 2013 for Windows, Office 365 for Mac
    Posts
    6

    Question Trying to copy data from one workbook in another and return one field as result

    Hello Excel-Experts,
    I have a problem with a vba Macro I wrote. Aim of the Function is to:
    - Save the data in fixed relative Positions to the cell the function is located in
    - enter the saved data in parameter fields in another workbook
    - return as "value" of the field the function is written in the value of one field in this second workbook.
    After some problems now the function gets compiled as correct - but when entering the function in a cell nothing happens
    (I can't see the values being entered in the second workbook, the Cell with the function only shows "#Value"
    I wrote the same stuff as "sub" which does exactly what i want - i would just prefer having it as a formula.
    Thanks for your Help,
    PB

    Please Login or Register  to view this content.
    Last edited by ExcellentName; 05-30-2016 at 12:09 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Trying to copy data from one workbook in another and return one field as result

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    05-25-2016
    Location
    Munich, Germany
    MS-Off Ver
    Office 2013 for Windows, Office 365 for Mac
    Posts
    6

    Re: Trying to copy data from one workbook in another and return one field as result

    Hi xladept, thanks for your answer.
    Creating two sample files wich are similar wont be easy - as the xlsm files are both large, complex and confidential, but before i try to create one of those i have additional info:
    Not only does the code work as sub, also the function code works until the last line where the funcion value autorating is defined with the value from the other sheet (see screenshot):
    Please Login or Register  to view this content.
    and even if comiling with f8 step by step shows that every step until assigning the rating to the function works, in the cell it still says "#value" (also no matter what formate i give the cell or the function.
    Strange.jpg

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Trying to copy data from one workbook in another and return one field as result

    Try:

    Please Login or Register  to view this content.

+ 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. Copy data in a loop from one sheet to another and return result
    By Big_Kev in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2014, 04:50 PM
  2. [SOLVED] Searching multiple worksheets in a workbook and return the result to sheet1
    By wychen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2013, 02:35 AM
  3. Compare 2 workbooks for same id's, return specific result to first workbook
    By biker22 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-30-2013, 12:12 PM
  4. Replies: 0
    Last Post: 05-26-2013, 11:33 AM
  5. Replies: 3
    Last Post: 07-13-2012, 12:13 PM
  6. Lookup filtered field to return desired result
    By dave2297 in forum Excel General
    Replies: 1
    Last Post: 02-17-2011, 04:30 PM
  7. I need a function to return a result from multiple places in workbook
    By karbuck in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-17-2009, 01:14 PM
  8. Code to open a workbook , copy info and return it to another workbook using a cell v.
    By england79m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2008, 11:22 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