+ Reply to Thread
Results 1 to 15 of 15

Add Roundup to existing formulae/

  1. #1
    Forum Contributor
    Join Date
    03-14-2017
    Location
    london, england
    MS-Off Ver
    office 365
    Posts
    173

    Add Roundup to existing formulae/

    =IF(A2="","",SUMIFS(sheet1!H:H,sheet1!P:P,A2,sheet1!E:E,B2,sheet1!F:F,C2))

    The above formulae takes information from "sheet1" and returns the results in "sheet2". The results returned are fractional numbers (1.5, 113.75 etc) as this is how they are entered in "sheet1", I wish to have the results shown in "sheet2" as Intergers (whole numbers) so would like to add a roundup function to the existing formulae
    Last edited by Dom.Knight; 05-12-2021 at 04:48 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    12-14-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    439

    Re: Add Roundup to existing formulae/

    Hi,

    The formula will be following
    PHP Code: 
    =IF(A2="","",ROUNDUP(SUMIFS(sheet1!H:H,sheet1!P:P,A2,sheet1!E:E,B2,sheet1!F:F,C2),0)) 

  3. #3
    Forum Contributor
    Join Date
    03-14-2017
    Location
    london, england
    MS-Off Ver
    office 365
    Posts
    173

    Re: Add Roundup to existing formulae/

    Many thanks, I have a second question based on the answer provided.


    =IF(B104="","",ROUNDUP(SUMIFS($F$7:$F$100,$B$7:$B$100,$B104,$E$7:$E$100,C104),0))

    This is a second formuale with use of the roundup function however it adds up any fractional number of the specific criteria to form the interger.
    (Example if i have David with a score of 17.5 in race 1 and David with a score of 12.5 in race 2 it provides the answer 30 however im looking for the answer 31 to be retunred)

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Add Roundup to existing formulae/

    If all are rounded up:
    =IF(B104="","",SUMPRODUCT(ROUNDUP($F$7:$F$100,0)*($B$7:$B$100=$B104)*($E$7:$E$100=C104)))

    If all are rounded to nearest integer only:
    =IF(B104="","",SUMPRODUCT(ROUND($F$7:$F$100,0)*($B$7:$B$100=$B104)*($E$7:$E$100=C104)))
    Quang PT

  5. #5
    Valued Forum Contributor
    Join Date
    12-14-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    439

    Re: Add Roundup to existing formulae/

    You can use a helper column to round the numbers and sum on this column.
    ❖ Please mark your thread is SOLVED if there has been offered a solution that works fine for you.

    ❖ If you like solutions provided by anyone, feel free to add reputation by clicking on ✶ Add Reputation bottom left of their posts.

  6. #6
    Forum Contributor
    Join Date
    03-14-2017
    Location
    london, england
    MS-Off Ver
    office 365
    Posts
    173

    Re: Add Roundup to existing formulae/

    Just seems to return #value

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Add Roundup to existing formulae/

    Quote Originally Posted by Dom.Knight View Post
    Just seems to return #value
    It seems there are text string inside column, try IFERROR to eliminate. Post a sample worksheet.

  8. #8
    Forum Contributor
    Join Date
    03-14-2017
    Location
    london, england
    MS-Off Ver
    office 365
    Posts
    173

    Re: Add Roundup to existing formulae/

    Sheet "Vessel" D104 contains the formaulae. Ive marked in G104 the results im expecting
    Attached Files Attached Files

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Add Roundup to existing formulae/

    Column F have "" (null value) coming from formula.

    Try again:

    =IF(B104="","",SUMPRODUCT(ROUNDUP($F$7:$F$100&0,0)*($B$7:$B$100=$B104)*($E$7:$E$100=C104)))

  10. #10
    Forum Contributor
    Join Date
    03-14-2017
    Location
    london, england
    MS-Off Ver
    office 365
    Posts
    173

    Re: Add Roundup to existing formulae/

    No thats now providing nonsense results ?

  11. #11
    Forum Contributor
    Join Date
    03-14-2017
    Location
    london, england
    MS-Off Ver
    office 365
    Posts
    173

    Re: Add Roundup to existing formulae/

    Anyone else able to help ? i have tried to correct cells from Number to general but again the results return inconclusive values.

  12. #12
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Add Roundup to existing formulae/

    You just said that it does not work, but did not tell us what the error is.
    Try to post a screenshot or worksheet again with errors.

  13. #13
    Forum Contributor
    Join Date
    03-14-2017
    Location
    london, england
    MS-Off Ver
    office 365
    Posts
    173

    Re: Add Roundup to existing formulae/

    Ok. As per my attched sheet, In red the results im looking for are : 191, 19, 5, 1, 17, 21, 2, 29, 98, 1, 2, 1, 32, 5

    When using =IF(B104="","",SUMPRODUCT(ROUNDUP($F$7:$F$100&0,0)*($B$7:$B$100=$B104)*($E$7:$E$100=C104))) in D104

    The results are as follows: 1910, 163, 50, 10, 53, 210, 2, 227, 386, 10, 11, 10, 320, 50

  14. #14
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Add Roundup to existing formulae/

    OK. Try again:
    Please Login or Register  to view this content.
    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

  15. #15
    Forum Contributor
    Join Date
    03-14-2017
    Location
    london, england
    MS-Off Ver
    office 365
    Posts
    173

    Re: Add Roundup to existing formulae/

    Thanks this is working with showing the correct results now.

+ 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. [SOLVED] Excel Formulae - unable to undestand the formula(e) meaning in an existing excel workbook
    By ateestructural in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-04-2020, 04:42 AM
  2. VBA code to replace formulae in cells and then re-enter same formulae again after run
    By excel_msa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2017, 06:56 AM
  3. [SOLVED] VBA - Match formulae to enter data on a pre-existing row using a form entry
    By Mlanger575 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-01-2016, 09:37 AM
  4. Applying Named Ranges to Existing Formulae
    By Usman_W in forum Excel General
    Replies: 3
    Last Post: 06-26-2012, 01:59 PM
  5. Macro to apply existing formulae to all rows in a sheet
    By andysurtees in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-26-2009, 09:44 PM
  6. Replies: 0
    Last Post: 08-02-2006, 02:43 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