+ Reply to Thread
Results 1 to 9 of 9

Replacing a cell in a formula by an other

  1. #1
    Registered User
    Join Date
    05-12-2016
    Location
    Canada
    MS-Off Ver
    Microsoft Office Famille et Étudiant 2019
    Posts
    28

    Replacing a cell in a formula by an other

    Here's my problem. I have several long formulas that I need to adapt one by one in order to obtain the desired result. Here is an example of a formula using "IF" (which is "SI" in French).

    =SI(C33=1;$TM$26;SI(C33=2;$TM$27;SI(C33=3;$TM$28;SI(C33=4;$TM$29;SI(C33=5;$TM$30;SI(C33=6;$TM$31;SI(C33=7;$TM$32;SI(C33=8;$TM$33;SI(C33=9;$TM$34;SI(C33=10;$TM$35;SI(C33=11;$TM$36;SI(C33=12;$TM$37;SI(C33=13;$TM$38;SI(C33=14;$TM$39;SI(C33=15;$TM$40;SI(C33=16;$TM$41;SI(C33=17;$TM$42;SI(C33=18;$TM$43;SI(C33=19;$TM$44;SI(C33=20;$TM$45;SI(C33=21;$TM$46;SI(C33=22;$TM$47;SI(C33=23;$TM$48;SI(C33=24;$TM$49;SI(C33=25;$TM$50;SI(C33=26;$TM$51;SI(C33=27;$TM$52;SI(C33=28;$TM$53;SI(C33=29;$TM$54;SI(C33=30;$TM$55;SI(C33=31;$TM$56;SI(C33=32;$TM$57;SI(C33=33;$TM$58;SI(C33=34;$TM$59;""))))))))))))))))))))))))))))))))))

    In this fomula, I wish to modify all the "TM" into "UF" without having to manually change them one by one. Is there a speedy way to do this? Thanks!
    GO! WINGS! GO!

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Replacing a cell in a formula by an other

    Hi,

    Yes, this can be done with a Find and Replace.

    Find what: $TM$
    Replace with: $UF$

    Hope this is helpful

  3. #3
    Registered User
    Join Date
    05-12-2016
    Location
    Canada
    MS-Off Ver
    Microsoft Office Famille et Étudiant 2019
    Posts
    28

    Re: Replacing a cell in a formula by an other

    Cool! I'll try this out later this evening. Thank you for your reply (you have just saved me a whole lotta work)! THANKS!

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Replacing a cell in a formula by an other

    reading your question I think you also have to take a look at Vlookup, since your used 33 or 34 if statements.

    without seeing a small part of the excel file, without confidential information it is hard to advice for your situation.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Replacing a cell in a formula by an other

    @oeldere makes an excellent point. You would be better served with using VLOOKUP.

    See attached example.
    Attached Files Attached Files

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Replacing a cell in a formula by an other

    ..or perhaps even simpler

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  7. #7
    Registered User
    Join Date
    05-12-2016
    Location
    Canada
    MS-Off Ver
    Microsoft Office Famille et Étudiant 2019
    Posts
    28

    Re: Replacing a cell in a formula by an other

    I'm familiar with VLOOKUP. And yes, it could be used as an alternate way to run my program. However, I'm not familiar with the INDEX formula. I'll look into it.

    Also, I tried FIND AND REPLACE earlier this morning... YEAH BABY!!! It works real nice! I knew there was a simplier way to get things done, I just didn't know how. Many thanks to SOUTHWARD!

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Replacing a cell in a formula by an other

    You're welcome. We appreciate 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.

    It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

  9. #9
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Replacing a cell in a formula by an other

    Glad I could be of some assistance

+ 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: 5
    Last Post: 01-27-2016, 11:06 AM
  2. [SOLVED] Replacing formula with $ variable cell reference
    By PQK78 in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 07-17-2015, 12:14 AM
  3. Replacing cell value without replacing formula in the cell
    By kingoftheace in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-17-2012, 06:28 AM
  4. Is there a formula for replacing a symbol with text from another cell?
    By alannanoelle in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-20-2012, 07:12 PM
  5. Replacing a formula with another cell
    By help000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2008, 11:25 AM
  6. Replacing "0" values with null string in array while preserving cell formula
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2007, 01:07 PM
  7. Replacing data using the cell value not the formula
    By Hunter1978 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2006, 05:20 AM

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