+ Reply to Thread
Results 1 to 5 of 5

Thread: Multiple Formulas in a single Cell

  1. #1
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Dartford
    MS-Off Ver
    Excel 2007
    Posts
    162

    Multiple Formulas in a single Cell

    Can anyone help at all, I have two formulas i need to have in one cell, I do not know how to correctly put them together, please see below formulas.

    Can anyone let me know how to do this.

    =IF(C37="Daily Total",SUM(OFFSET($F$1,MATCH(MAX($G$3:G36),G:G,0),0,MATCH(MAX($G$3:G38),G:G,0)-MATCH(MAX($G$3:G36),G:G,0)-1,1)),"")

    =SUM(D5*E5)

    I would very much appreciate someones help.

    Shazz
    x

  2. #2
    Forum Guru Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    Excel 2010
    Posts
    1,249

    Re: Multiple Formulas in a single Cell

    Please explain what you mean by "put them together". Do you just want to concatenate the results? What cells are these formulas in?

    If possible, please provide a sample workbook to further illustrate your problem and desired result.

  3. #3
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566

    Re: Multiple Formulas in a single Cell

    Hi,

    It's not clear what result you're expecting to see and what you mean by 'putting them together'.

    Do you mean the second SUM() formula is dependent on the IF condition in the first formula and should apply if the IF test is false. In which case try

    =IF(C37="Daily Total",SUM(OFFSET($F$1,MATCH(MAX($G$3:G36),G:G,0),0,MATCH(MAX($G$3:G38),G:G,0)-MATCH(MAX($G$3:G36),G:G,0)-1,1)),SUM(D5*E5))
    otherwise upload an example workbook and show what result you expect to see.
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  4. #4
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Dartford
    MS-Off Ver
    Excel 2007
    Posts
    162

    Re: Multiple Formulas in a single Cell

    I have a spread sheet where Column F is called Price, With in This Column F5-F65536 I need both of the above Formulas in there, I am not sure how to go about this, I know obviously how to put a formula in a cell but not how to have two seperate one in there.

    I have tried the above code you gave but this does not work.

    Basically I want to calculate the cost with =SUM(D5*E5) but if in C5 the word "Daily Total" appears then =IF(C37="Daily Total",SUM(OFFSET($F$1,MATCH(MAX($G$3:G36),G:G,0),0,MATCH(MAX($G$3:G38),G:G,0)-MATCH(MAX($G$3:G36),G:G,0)-1,1)),"") will come in to action. I hope this makes sense.

    I can not upload a sample due to work restrictions, but if you let me have an e-mail address I can e-mail it to you.

    Thanks

    Shazz
    Last edited by Shazz; 01-10-2012 at 04:06 AM. Reason: Added a line of text.

  5. #5
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566

    Re: Multiple Formulas in a single Cell

    Hi,

    Try

    =IF(C$5="Daily Total",IF(C37="Daily Total",SUM(OFFSET($F$1,MATCH(MAX($G$3:G36),G:G,0),0,MATCH(MAX($G$3:G38),G:G,0)-MATCH(MAX($G$3:G36),G:G,0)-1,1)),""),d5*E5)
    Although I'm not sure why you want to test for Daily Total twice. Generally if you have two IF Tests make one the default result of the other.
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

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