+ Reply to Thread
Results 1 to 2 of 2

How to use CEIL FUNCTION IN SQL TO EXCEL

  1. #1
    Registered User
    Join Date
    06-20-2014
    Location
    Cuddalore, Tamilnadu, India
    MS-Off Ver
    MS Office 2013
    Posts
    22

    How to use CEIL FUNCTION IN SQL TO EXCEL

    Hi Concern,

    I have attached the excel file for converting ceil function to use excel
    and tried different way and not desired achieved the output

    in detail,

    TOTAL_DURATION ANSMIN RoundedMIN
    01/11/2016 19,264,506.00 321,075.10 334,112.40

    => ANSMIN = TOTAL_DURATION /60

    FROM SQL LOGIC:
    => RoundedMIN = ((Round((TOTAL_DURATION)/6)*6)/60)

    OR

    => RoundedMIN = ((CEIL(TOTAL_DURATION/6)*6))/60

    here the concern is how to convert the sql logic into excel or access to get the result (334,112.40)

    Regards,
    Siva
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-30-2015
    Location
    Netherlands
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    145

    Re: How to use CEIL FUNCTION IN SQL TO EXCEL

    Hi,

    This is gonna be difficult because i can't recreate your sample outcome using the SQl statements you've supposedly used.

    So theoretically
    Your SQl statement RoundedMIN = ((Round((TOTAL_DURATION)/6)*6)/60) would be this in Excel =ROUNDUP(C2/6,0)*6/60 and RoundedMIN = ((CEIL(TOTAL_DURATION/6)*6))/60 would be =((CEILING(C2/6;1)*6))/60

    But as said it's theoretical cause these statements do not evaluate into the correct answer as per your file.
    HtH,

    Joris

    --------------------------------------------------------------------------------
    If you found my answer helpful, please hit the Like or Thank button.

    Please follow the forum Rules and Guidelines and use Code tags around your VBA code.

    Remember: test VBA code always on a copy of your file because usually you can't use undo

+ 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. Replies: 4
    Last Post: 04-24-2014, 11:56 AM
  2. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  3. Excel Match Function not working with Right function.
    By swap579579 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-16-2013, 09:00 PM
  4. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  5. Replies: 2
    Last Post: 03-30-2009, 04:04 AM
  6. Javascript function converting to Excel function
    By kamila in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-31-2007, 07:06 AM
  7. [SOLVED] Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:05 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