+ Reply to Thread
Results 1 to 4 of 4

Thread: Write values of the formulas in to the cells instead of using formula in the cell

  1. #1
    Registered User
    Join Date
    05-26-2009
    Location
    istanbul
    MS-Off Ver
    Excel 2003
    Posts
    2

    Write values of the formulas in to the cells instead of using formula in the cell

    I have the below formula in C1,C2 and goes on about 4000 rows.When i change the values in the sheet it slows down and calculate after a long time.Could it be possible to calculate formula values for each cell by excel macro and write only the value instead of formula.

    C1
    =(IF(DAY(M1)<10;"0"&DAY(M1);DAY(M1))&IF(MONTH(M1)<10;"0"&(MONTH(M1));MONTH(M1))&RIGHT(YEAR(M1);2))&" "&N1&" "&LEFT(F1;4)&" "&IF(ISERROR(IF(SEARCH(",";B1;1)=3;LEFT(B1;2)&"."&RIGHT(B1;LEN(B1)-SEARCH(",";B1;1));IF(SEARCH(",";B1;1)=2;LEFT(B1;1)&"."&RIGHT(B1;LEN(B1)-SEARCH(",";B1;1));IF(SEARCH(",";B1;1)=4;LEFT(B1;3)&"."&RIGHT(B1;LEN(B1)-SEARCH(",";B1;1));IF(SEARCH(",";B1;1)=0;B1;"YOK")))));B1;IF(SEARCH(",";B1;1)=3;LEFT(B1;2)&"."&RIGHT( B1;LEN(B1)-SEARCH(",";B1;1));IF(SEARCH(",";B1;1)=2;LEFT(B1;1)&"."&RIGHT(B1;LEN(B1)-SEARCH(",";B1;1));IF(SEARCH(",";B1;1)=4;LEFT(B1;3)&"."&RIGHT(B1;LEN(B1)-SEARCH(",";B1;1));IF(SEARCH(",";B1;1)=0;B1;"YOK")))))&" "&VALUE(RIGHT(F1;3))

    C2
    =(IF(DAY(M2)<10;"0"&DAY(M2);DAY(M2))&IF(MONTH(M2)<10;"0"&(MONTH(M2));MONTH(M2))&RIGHT(YEAR(M2);2))&" "&N2&" "&LEFT(F2;4)&" "&IF(ISERROR(IF(SEARCH(",";B2;1)=3;LEFT(B2;2)&"."&RIGHT(B2;LEN(B2)-SEARCH(",";B2;1));IF(SEARCH(",";B2;1)=2;LEFT(B2;1)&"."&RIGHT(B2;LEN(B2)-SEARCH(",";B2;1));IF(SEARCH(",";B2;1)=4;LEFT(B2;3)&"."&RIGHT(B2;LEN(B2)-SEARCH(",";B2;1));IF(SEARCH(",";B2;1)=0;B2;"YOK")))));B2;IF(SEARCH(",";B2;1)=3;LEFT(B2;2)&"."&RIGHT( B2;LEN(B2)-SEARCH(",";B2;1));IF(SEARCH(",";B2;1)=2;LEFT(B2;1)&"."&RIGHT(B2;LEN(B2)-SEARCH(",";B2;1));IF(SEARCH(",";B2;1)=4;LEFT(B2;3)&"."&RIGHT(B2;LEN(B2)-SEARCH(",";B2;1));IF(SEARCH(",";B2;1)=0;B2;"YOK")))))&" "&VALUE(RIGHT(F2;3))

  2. #2
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,953

    Re: Write values of the formulas in to the cells instead of using formula in the cell

    Hi kgc400, and welcome to the forum.

    Some lengthy formulas you have there. You may want to just set calculation to Manual for that workbook, so you can make changes to cells without it automatically re-calculating every time.

    In Excel 2003, go to Tools -> Options -> Calculation and select Manual. To re-calculate when needed you can press F9.

  3. #3
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: Write values of the formulas in to the cells instead of using formula in the cell

    And just out of curiosity - re: C1 could you not use:

    C1: =TEXT(M1;"ddmmyy")&" "&N1&" "&LEFT(F1;4)&" "&SUBSTITUTE(B1;",";".")&" "&VALUE(RIGHT(F1;3))

    Regardless I would be surprised if these formulae were to cause significant slowdown, do you have other formulas running on the sheet ... in particular any Volatiles (INDIRECT,OFFSET etc..) and/or Arrays (incl. Sumproducts)

  4. #4
    Registered User
    Join Date
    05-26-2009
    Location
    istanbul
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Write values of the formulas in to the cells instead of using formula in the cell

    Quote Originally Posted by DonkeyOte View Post
    And just out of curiosity - re: C1 could you not use:

    C1: =TEXT(M1;"ddmmyy")&" "&N1&" "&LEFT(F1;4)&" "&SUBSTITUTE(B1;",";".")&" "&VALUE(RIGHT(F1;3))

    Regardless I would be surprised if these formulae were to cause significant slowdown, do you have other formulas running on the sheet ... in particular any Volatiles (INDIRECT,OFFSET etc..) and/or Arrays (incl. Sumproducts)
    Hi Donkeyote

    I have many formulas like this and sometimes it slows like it will never end. Could i adjust a macro instead of this formula, it will be so thankful. I can not use manual calculation because sometimes i may be forget it to apply , errors was occurred in my past practice.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0