+ Reply to Thread
Results 1 to 12 of 12

Automatically copy contents of cell derived from a formula.

  1. #1
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    132

    Automatically copy contents of cell derived from a formula.

    Hi

    How can I copy a variable from for example A1 to G1 when A1 is the result of a formula. When I attempt this I get a NAME error. A1 changes frequently so I dont want to use the manual copy and paste values option.

    Thanks in advance

    Nigel

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Automatically copy contents of cell derived from a formula.

    Why not link the two?

    So in Cell G1 simply use
    =A1

    Or am I missing something?
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    132

    Re: Automatically copy contents of cell derived from a formula.

    Hi, I tried that and it didnt work. The contents of A1 is a variable from a different so I assumed thats why your suggestion didnt work. Im not in the office now and wont be until Sunday and I will retry then. Thanks for your reply

    Regards

    Nigel

  4. #4
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    132

    Re: Automatically copy contents of cell derived from a formula.

    Back in the office now and retried linking the two cells as suggested just to make sure and it returns a value of 0 in G1. A1 contains a variable from a different workbook in case that makes any difference. Is there any other way of copying the value from A1 to G1?

    Thanks in advance. Nigel

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Automatically copy contents of cell derived from a formula.

    Unless A1 is empty, a reference to that cell will return whatever is in that cell - irrespective of where it comes from - and if it is empty, then it will return 0. what (exactly) is in A1?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Automatically copy contents of cell derived from a formula.

    if A1 is a ling to another workbook, and you want it to be copied to G1 so it shows there... then why not put that LINK in G1 instead of A1 removing the redundancy...

    Can you add a file with the example... only make sure your example does not reference an outside workbook, instead make it go to a new sheet just for the sake of argument so we can see what it is you are actually doing please.

    Thanks
    -If you think you are done, Start over - ELeGault

  7. #7
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    132

    Re: Automatically copy contents of cell derived from a formula.

    Hi. Cell A1 has the following.... [tyre ordering system.xlsm]Main Sheet'!E58....This returns a 5 digit number from a different workbook. My plan is to use that figure (which is a variable) in another calculation but I cant get Excel to recognise it. So I tried to copy it to another location (G1) simply by putting =A1 in cell G1 to see if that would work but it just returns a zero. How can I use the numeric variable content in A1 in another calculation? I hope that explains my problem more clearly.

    Thanks and regards

    Nigel

  8. #8
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Automatically copy contents of cell derived from a formula.

    Wrap[ Value around it. Sounds like it is making it text currently. That should do it...

    =VALUE([tyre ordering system.xlsm]Main Sheet'!E58)

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Automatically copy contents of cell derived from a formula.

    Not that it should matter, but is the data that is being pulled in really a number, or is it text that just looks like a number? Test with =ISNUMBER(A1) FALSE indicates text.

    However, using =A1 in another cell should return the contents of A1, whether it is numeric or not

    I think you are going to have to upload a clean sample of both of those workbooks here to the forum

  10. #10
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Automatically copy contents of cell derived from a formula.

    Touché Ford,

    I am assuming it is a text version of numbers based on the post
    This returns a 5 digit number from a different workbook
    .
    But a working version of this would be helpful to verify.

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Automatically copy contents of cell derived from a formula.

    Quote Originally Posted by ELeGault View Post
    Touché Ford,

    I am assuming it is a text version of numbers based on the post .
    But a working version of this would be helpful to verify.
    Even with text, =A1 should still return what is in the cell, thats what has me puzzled

  12. #12
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    132

    Re: Automatically copy contents of cell derived from a formula.

    The suggestion by ELeGault to "wrap value round it" worked so im very grateful to him and all the others who took the time to help...much appreciated.

    Regards

    Nigel

+ 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. Like to copy cell based on value derived from Formula
    By Leo2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-19-2010, 11:22 PM
  2. How do I copy cell values (derived from formula), not references?
    By Matt in a spot of bother in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  3. [SOLVED] How do I copy cell values (derived from formula), not references?
    By Biff in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 06:05 AM
  4. [SOLVED] How do I copy cell values (derived from formula), not references?
    By Matt in a spot of bother in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  5. How do I copy cell values (derived from formula), not references?
    By Matt in a spot of bother in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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