+ Reply to Thread
Results 1 to 6 of 6

Find and Replace for formula

  1. #1
    Registered User
    Join Date
    03-04-2010
    Location
    Boston
    MS-Off Ver
    Excel 2003
    Posts
    4

    Find and Replace for formula

    Hi guys,

    I have a dataset with 150 rows and 50 columns. At the end of this I have a series of formula, like, SUM (B2:B160). In the same section I also have formula like (SUM(C2:C160))-1 and headers like 95% confidence interval.

    I am trying to use the find and replace function to apply the formulas only to specific rows I need. While I can do this for the large part, sometimes when I say find 1 and replace by 10, it ends up replacing the (SUM(C2:C160))-1 both these 1 (in red). Similiar to replace 5 with some other number, it replaces the 5 part of the 95% CI.

    My questions are as follows:

    1. Is there a way to enter some numbers in the formula which is hidden from the find function and cannot be replaced. For ex: (SUM(C2:C160))-1. IN this is there a way that the Find function doesnt look at the (-1).
    2. How can I ensure that the find function finds 1 and not 1 in the number 160.

    thanks in advance.
    Last edited by sripalkumar; 03-05-2010 at 03:10 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Find and Replace for formula

    Hello sripalkumar,

    may I ask why you use find and replace to change the formulas?

    What to you want the formulas to change to?

  3. #3
    Registered User
    Join Date
    03-04-2010
    Location
    Boston
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Find and Replace for formula

    The spreadsheet has 160 rows of data. I do not want to use all of the 160 rows for all calculation. If I want to use the rows 25 to 50, I would want to change the function in SUM(B1:B160) to SUM(B25:B50). The SUM function is just an example but the actual formula is more complex.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Find and Replace for formula

    Perhaps use two cells to define the included range? If the start row were in Z1 and the end row were in Z2, change your "sum" formula to this:

    =SUM(INDEX(B:B, $Z$1) : INDEX(B:B, $Z$2))

    This would cause the range to reorient anytime you changed the values in Z1 and Z2.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    03-04-2010
    Location
    Boston
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Find and Replace for formula

    JBeaucaire--you are the best. Works like a charm and I dont even have to do find and replace. This would save me tons of time.
    thanks,

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Find and Replace for formula

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

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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