+ Reply to Thread
Results 1 to 4 of 4

How to replace one variable in a long function

  1. #1
    Registered User
    Join Date
    09-23-2014
    Location
    vancouver, Canada
    MS-Off Ver
    2007
    Posts
    6

    How to replace one variable in a long function

    Hi all!!

    I thought that Substitute function would work but it did not.

    I have the following equation Entered in cell B38

    if(A1>10,"YES","NO",)


    Now if i want cell B39 to be exactly the same as B38 i could just copy and past the forumla...BUT instead of A1, i want it to say B1... is there a short cut??

    My actual equation is much much longer than the one above so to go in and manually change every "a1" would take forever. Also, changing A1 to B1 is the only variable substitution i want... but it occurs many times..

    Thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: How to replace one variable in a long function

    Copy the formula (from the formula box) and paste it. Then select the cell and do a replace all.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-23-2014
    Location
    vancouver, Canada
    MS-Off Ver
    2007
    Posts
    6

    Re: How to replace one variable in a long function

    Thanks...i knew there was an obvious and easy way to do it!!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: How to replace one variable in a long function

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Column taking way too long to delete or replace
    By djnrempel in forum Excel General
    Replies: 3
    Last Post: 07-21-2014, 05:01 PM
  2. Find and Replace: Formula is Too Long
    By RJORDANW in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-19-2013, 11:28 PM
  3. Find & Replace/Formula Too Long
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2010, 03:44 PM
  4. Replace with single tick - formula too long....
    By te@ivorypetal.com in forum Excel General
    Replies: 1
    Last Post: 03-27-2006, 12:25 PM
  5. [SOLVED] Passing multiple strings to variable in Replace Function
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2006, 01:10 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