+ Reply to Thread
Results 1 to 7 of 7

IF formula to copy cell value to a 2nd file workbook

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    Central Florida
    MS-Off Ver
    MS Office 2010
    Posts
    20

    IF formula to copy cell value to a 2nd file workbook

    Using Excel 2010, I have 2 workbooks with multiple worksheets and have tried to use an IF formula to copy data from a cell in one worksheet from one file to a cell in a worksheet in a different file. I do not want data copied from blank cells.
    Specifically, I want to copy the value in workbook 1, cell G16 to the 2nd workbook called budget new, worksheet February, cell G127.
    In workbook 1, this is the formula: =IF(G16>0,[budget_new.xlsx]February!+G127,""). The error shows an invalid entry [budget_new.xlsx]February!+G127, for [value_if_true].
    Thanks for your help.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF formula to copy cell value to a 2nd file workbook

    Try removing the plus sign +.

    Also, you're missing the quotes around the file/sheet name:

    =IF(G16>0,'[budget_new.xlsx]February'!G127,"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    10-07-2013
    Location
    Central Florida
    MS-Off Ver
    MS Office 2010
    Posts
    20

    Re: IF formula to copy cell value to a 2nd file workbook

    Thanks Tony,
    Removed + sign, added quotes; Excel removes quotes, opens Update Values window for budget_new.xlsx, and returns REF# error.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF formula to copy cell value to a 2nd file workbook

    Try this...

    With both files open...

    Start typing the formula...

    =IF(G16>0,

    At that point use your mouse and navigate to the other file and point to the cell you want to link to.

    Excel will add the file/sheet name and cell reference to the formula...

    =IF(G16>0,'[budget_new.xlsx]February'!G127

    Then, just finish the formula...

    =IF(G16>0,'[budget_new.xlsx]February'!G127,"")

  5. #5
    Registered User
    Join Date
    10-07-2013
    Location
    Central Florida
    MS-Off Ver
    MS Office 2010
    Posts
    20

    Re: IF formula to copy cell value to a 2nd file workbook

    Nothing is added to the Formula

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF formula to copy cell value to a 2nd file workbook

    Sorry, I'm out of suggestions.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: IF formula to copy cell value to a 2nd file workbook

    Post sample workbooks.

    To upload a file, click "Go Advanced" then scroll down to "Manage Attachments".

+ 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] Help with formula to pick up a file path to a workbook from a cell in the same worksheet
    By Laura_93 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-13-2015, 10:39 AM
  2. Formula to copy cell from other workbook
    By syfauzan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-09-2014, 12:29 PM
  3. Replies: 3
    Last Post: 07-11-2013, 03:01 AM
  4. Automatically save file with cell value + copy cell values to other workbook
    By notquitetheguru in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-10-2013, 07:04 AM
  5. Replies: 5
    Last Post: 03-21-2013, 07:34 AM
  6. [SOLVED] File copy macro - with directory specified in workbook cell
    By superfurry in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-23-2010, 08:30 PM
  7. How do I copy a cell + it's formula from one workbook to another?
    By excel _ help for the hopeless, please in forum Excel General
    Replies: 4
    Last Post: 10-11-2005, 07:05 PM

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