+ Reply to Thread
Results 1 to 14 of 14

Figer la valeur d'une variable

  1. #1
    Registered User
    Join Date
    10-23-2014
    Location
    Tunisie
    MS-Off Ver
    2007
    Posts
    7

    Figer la valeur d'une variable

    hello
    I talk to the experts to excel VBA programming.
    I have a variable that represents the cash that I named "Cash", there are revenue and expenditure. The fund varies throughout the day quite sure. To display the value of the fund today, I used the following formula: = IF (date = TODAY (); Fund; "") see attached file.
    But this formula shows me the value of the fund just today, I need a macro that shows me the value of the fund each day, that is to say, throughout the day I want to see the real value and variable of the case, the next day I want to see the value of the fund at the end of yesterday froze corresponding to yesterday's date.
    The credit union continually varies throughout the day. I want to fix its value at the end of the day in the corresponding cell to the present.

    Thank you for your help
    Attached Files Attached Files
    Last edited by naahou2000; 10-23-2014 at 02:52 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Figer la valeur d'une variable

    Try next code: To be installed in the sheet code

    Please Login or Register  to view this content.
    Attached Files Attached Files
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    10-23-2014
    Location
    Tunisie
    MS-Off Ver
    2007
    Posts
    7

    Re: Figer la valeur d'une variable

    Thanks very much for your help
    the file caisse1.xlsm work perfectly for me.
    But i tryed to use this code on my original file, i don't succed.
    How can i use this code on my original file on all the yellow column : C-G-I-K-N-P-R-U-W-Y

    thanks
    Attached Files Attached Files
    Last edited by naahou2000; 10-25-2014 at 12:11 PM.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Figer la valeur d'une variable

    Will you please confirm my understanding:
    Columns concerned are : C-E-G-I-L-N-P-S-U-W
    You want for each column to copy the value of cell in row 1 into the cell in the row corresponding to TODAY.
    This must be done for each change in cell in row 1

  5. #5
    Registered User
    Join Date
    10-23-2014
    Location
    Tunisie
    MS-Off Ver
    2007
    Posts
    7

    Re: Figer la valeur d'une variable

    yes column C (from C5 to C369) depend of changes of Cell C1
    column E (from E5 to E369) depend of changes of Cell E1
    column G (from G5 to G369) depend of changes of Cell G1

    and so on, have a look on line 302.

    i think it must be one macro per only column

    Lets begin by column C

    thanks
    Last edited by naahou2000; 10-25-2014 at 02:53 PM.

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Figer la valeur d'une variable

    "i think it must be one macro per only column" ==> Hopefuly not
    Take care about the columns used.
    See next code
    Be awared that the value at the "today" row is updated only if cell in row 1 has changed

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by PCI; 10-25-2014 at 04:56 PM.

  7. #7
    Registered User
    Join Date
    10-23-2014
    Location
    Tunisie
    MS-Off Ver
    2007
    Posts
    7

    Re: Figer la valeur d'une variable

    OK good, this code work only if i change manually the value off the cells : C1, E1, G1 and so on, but on my file, these cells contains formula like (=Sheet1!A1).
    with formula on these cells, the value in the yellow column don't change.
    thanks
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Figer la valeur d'une variable

    See new macro
    Attached Files Attached Files
    Last edited by PCI; 10-27-2014 at 04:25 PM.

  9. #9
    Registered User
    Join Date
    10-23-2014
    Location
    Tunisie
    MS-Off Ver
    2007
    Posts
    7

    Re: Figer la valeur d'une variable

    Thanks but not work
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Figer la valeur d'une variable

    In the file attached, if you change cells "A1" value, the value in cell "E1" will change due to the formula and cell "E304" will be updated with "E1" value.
    That's what happen on my PC.

  11. #11
    Registered User
    Join Date
    10-23-2014
    Location
    Tunisie
    MS-Off Ver
    2007
    Posts
    7

    Re: Figer la valeur d'une variable

    Let's take a real example : Today Line No. 305 , column A, B and C.
    The B305 cell depends of today and cell C1 . ( in cell C1 , there is a formula that retrieves the value of the fund a separate sheet)
    I want the C305 cell following changes in cell B305 today.
    The next day the B306 cell show me the value of the fund tomorrow and B305 cell show me zero . I want the C306 cell show me the value of tomorrow but the C305 cell show me the value of yesterday not a zero .

    thanks

  12. #12
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Figer la valeur d'une variable

    See attached the last revision.
    When the file is openning a macro is launched to check where in column A is to day date.
    When it found the date it do a copy from Column B to C at the date row.
    Now when there is a change in columns "C-E-G-I-L-N-P-S-U-W" at row 1, the value of these cells are copied to the same columns at row where to day was found.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    10-23-2014
    Location
    Tunisie
    MS-Off Ver
    2007
    Posts
    7

    Re: Figer la valeur d'une variable

    work only if changes of cells C1 to W1 are made manually

    but the value of these cells are made by a formula that bring the changed value from another sheet. In this case, don't work.

    thanks

  14. #14
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Figer la valeur d'une variable

    Here another variation but it needs an extra row (here row1) to record previous values.
    This row can be hidden
    Attached Files Attached Files

+ 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. Replies: 4
    Last Post: 07-12-2013, 12:14 PM
  2. Replies: 1
    Last Post: 10-27-2012, 02:54 AM
  3. Replies: 0
    Last Post: 02-09-2012, 10:06 AM
  4. [SOLVED] Freeze titles (Figer les volets)
    By Jac Tremblay in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-21-2006, 09:55 PM
  5. [SOLVED] je voudrait la formule pour mettre 12,78 heures en valeur h:mm
    By tedwynnie in forum Excel General
    Replies: 2
    Last Post: 09-26-2005, 02: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