+ Reply to Thread
Results 1 to 6 of 6

complicated find and replace

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    complicated find and replace

    Hello. I want to change a bunch of formulas in a column but it's very complicated.

    Here is an example. I want to change

    =SUM('ACTUALS summary'!AL115:AO115)*1000
    to
    =SUM(INDIRECT("'ACTUALS summary'!AL115:"&O8&"115"))*1000
    by using a find and replace.

    BUT even if I can figure out how to do a find and replace for that, it gets complicated because while the other formulas have the same pattern, they are slightly different.

    For example, I also want to change
    =SUM('ACTUALS summary'!AL116:AO116)*1000
    to
    =SUM(INDIRECT("'ACTUALS summary'!AL116:"&O8&"116"))*1000

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: complicated find and replace

    Are these cells all adjacent and being dragged down?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: complicated find and replace

    What do you mean? The cells are adjacent, but the references are random (somebody hard coded them in).

  4. #4
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: complicated find and replace

    I was trying to do it piecemeal. For example, starting with replace sum( with sum(indirect(" but it won't let me do that because it says the formula is incorrect and then doesn't replace anything.

  5. #5
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: complicated find and replace

    Here is an example of the adjacent formulas.

    =SUM('ACTUALS detail'!AM162:AP162)
    =SUM('ACTUALS detail'!AM133:AP133)

  6. #6
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: complicated find and replace

    The indirect makes it so that the AP section of the formula becomes dynamic (referencing another cell that is automatically updated.

+ 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. very complicated find and replace code
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2015, 04:03 PM
  2. [SOLVED] Formula to use in complicated replace
    By njelezn in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-20-2015, 07:11 PM
  3. Replace Fill Down, Complicated Equation
    By thequiff in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-15-2012, 10:03 AM
  4. Complicated Find - Replace
    By abertrand in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-13-2009, 01:13 PM
  5. Userform, Find and Replace - Really Complicated
    By HelenMcKenzie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2006, 06:22 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