+ Reply to Thread
Results 1 to 14 of 14

formula to copy first value

  1. #1
    Registered User
    Join Date
    09-22-2014
    Location
    europe
    MS-Off Ver
    microsoft office 2010
    Posts
    23

    formula to copy first value

    Hello,

    I would like to know if there is formula to copy only first value of the cell.

    For an example. A1 has at the begining value 1, after some time I change it to 2 etc. etc., but I need in B1 only the first value. So the option =value(A1) can not work, because it would change B1 always when I change A1.

    Is it possible?

    Thank you.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: formula to copy first value

    If you are open to a VBA solution, try this code.......
    Please Login or Register  to view this content.
    To apply this code to your workbook, follow these steps....
    • Open your workbook.
    • Right Click on the Sheet Tab --> View Code.
    • Paste the code given above in the opened code window.
    • Close the VBA Editor.
    • Save your workbook as Excel Macro-Enabled Workbook.]
    • Done.
    This code will place the very first value which you entered in any cell of col. A into corresponding cell of col. B.
    Is this what you are trying to achieve?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    09-22-2014
    Location
    europe
    MS-Off Ver
    microsoft office 2010
    Posts
    23

    Re: formula to copy first value

    Thank you very much for your effort, but I am unable to view code. I guess it is because I do not have VBA editor? I did some google check and i custumized ribbon > checked Developer, still however I am not able to "view code". Really thank you very much for your effort and help, but is there any other solution to this? Thank you

  4. #4
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: formula to copy first value

    You literally just want the first character? Wouldn't this work?

    =MID(A1,1,1)

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

    Re: formula to copy first value

    Quote Originally Posted by hoyasaxa215 View Post
    You literally just want the first character? Wouldn't this work?

    =MID(A1,1,1)
    Maybe this...

    =LEFT(A1)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: formula to copy first value

    Quote Originally Posted by Tony Valko View Post
    Maybe this...

    =LEFT(A1)
    touche, sir.

  7. #7
    Registered User
    Join Date
    09-22-2014
    Location
    europe
    MS-Off Ver
    microsoft office 2010
    Posts
    23

    Re: formula to copy first value

    Hi guys, thank you, but none of this work.

    All I am trying is to capture the first value in cell A1. In this cell numbers will change all the time, but in order to do further calculation I need memorised first value, which happens. And this value must be copied to B1. Classical function in B1... (=value(A1)) is not an option, because if number in A1 changes, it also does change in B1, where as I have said, I need only the first value of A1

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: formula to copy first value

    The number in A1 is changed manually or by a formula? And in B1 you want to put the first ever number entered in A1?

  9. #9
    Registered User
    Join Date
    09-22-2014
    Location
    europe
    MS-Off Ver
    microsoft office 2010
    Posts
    23

    Re: formula to copy first value

    I get the number over link... it is somehow exported or loged to excell and it changes constantly. Basically there is no formula.

    And yes, I would like to put in B1 the first ever number, which apperas in A1. If it is 1, then it is 1. If it is 20340, then it is 20340.

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

    Re: formula to copy first value

    Quote Originally Posted by oneandtwo View Post
    I get the number over link...
    You say you want the first entry.

    Does that mean at the beginning of the day (or whenever) that the cell is empty? Then, as the day goes by, the cell entry changes many times but you only want the very first entry that appears?


    If the cell doesn't start out as an empty cell there's no way to tell which is the very first entry.

  11. #11
    Registered User
    Join Date
    09-22-2014
    Location
    europe
    MS-Off Ver
    microsoft office 2010
    Posts
    23

    Re: formula to copy first value

    Quote Originally Posted by Tony Valko View Post
    You say you want the first entry.

    Does that mean at the beginning of the day (or whenever) that the cell is empty? Then, as the day goes by, the cell entry changes many times but you only want the very first entry that appears?


    If the cell doesn't start out as an empty cell there's no way to tell which is the very first entry.
    Yes, the cell is empty, it's is conditioned to start capturing values... But as i I have said. I can't imagine how to capture the first value of the cell.

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

    Re: formula to copy first value

    Depending on what type of link you have, a formula using intentional circular references may work.

    Do this first...

    Goto>File>Options>Formulas
    Check Enable iterative calculation
    OK out

    Assuming cell A1 is the linked cell.

    Enter this formula in B1:

    =IF(A1="","",IF(B1="",A1,B1))

    B1 will return the initial original value of cell A1 until cell A1 is cleared and the cycle starts again.

  13. #13
    Registered User
    Join Date
    09-22-2014
    Location
    europe
    MS-Off Ver
    microsoft office 2010
    Posts
    23

    Re: formula to copy first value

    Quote Originally Posted by Tony Valko View Post
    Depending on what type of link you have, a formula using intentional circular references may work.

    Do this first...

    Goto>File>Options>Formulas
    Check Enable iterative calculation
    OK out

    Assuming cell A1 is the linked cell.

    Enter this formula in B1:

    =IF(A1="","",IF(B1="",A1,B1))

    B1 will return the initial original value of cell A1 until cell A1 is cleared and the cycle starts again.
    Hey Tony, this works perfect. Thank you very much!!! I appreciate it a lot.

    As well many thanks to Sktneer and Hoyasaxa215. You rule guys!

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

    Re: formula to copy first value

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. Alter existing formula to copy specific cells in row instead of copy entire column
    By painterartist in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-02-2014, 12:42 PM
  2. Replies: 8
    Last Post: 07-08-2013, 06:03 AM
  3. Replies: 3
    Last Post: 01-30-2013, 04:32 PM
  4. Copy Formula:copy the exact same formula in one column
    By Leprechaun in forum Excel General
    Replies: 1
    Last Post: 12-11-2006, 07:46 PM
  5. [SOLVED] Copy/Paste how to avoid the copy of formula cells w/o calc values
    By Dennis in forum Excel General
    Replies: 10
    Last Post: 03-02-2006, 06:50 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