+ Reply to Thread
Results 1 to 8 of 8

Using CEILING and IF function in the same cell

  1. #1
    Registered User
    Join Date
    02-04-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    10

    Using CEILING and IF function in the same cell

    Good Morning,
    I'm currently using the CEILING function to round up to the nearest .5. My spreadsheet is based on square footage, what I need is a formula using the same rounding function but anything less than or equal to 4 is 4. Maybe the IF function isn't what I need?

    For example

    (We use Width by Height)

    If I have a 35 x 35 it'll equal 8.51 Square feet and it'll round up to 9. My equation right now is =CEILING(F4,0.5) the 8.51 being the F4 CELL.
    If I have a 12 x 12 it'll equal 1 square foot, but I need this to equal 4.

    4 is our minimum square footage, anything less than or equal to 4, should be 4.


    Thank you ahead of time and any help is appreciated!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: Using CEILING and IF function in the same cell

    Use the MAX function, like this:

    =MAX(4,CEILING(F4,0.5))

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-04-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    10

    Re: Using CEILING and IF function in the same cell

    You sir, are a legend!

    thank you!!!!

  4. #4
    Registered User
    Join Date
    02-04-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    10

    Re: Using CEILING and IF function in the same cell

    I didn't think this through entirely.

    The formula works perfectly, but if there is no square footage added can we maintain a 0. So if I have a price multiplied by my square footage and no information was given, can we have the cell equal 0 unless information was entered?

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: Using CEILING and IF function in the same cell

    Use this instead:

    =IF(F4=0,0,MAX(4,CEILING(F4,0.5)))

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    08-12-2019
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Using CEILING and IF function in the same cell

    Try this bud

    =IF(F4="",0,MAX(4,CEILING(F4,0.5)))

  7. #7
    Registered User
    Join Date
    02-04-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    10

    Re: Using CEILING and IF function in the same cell

    Thank you very much, both of you. This is exactly what I needed.

    Hopefully one day I can stump you all with my intense excel formulas

    Have a great day!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: Using CEILING and IF function in the same cell

    Glad to help.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. CEILING Function
    By DBExcelDB in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-26-2018, 03:29 PM
  2. [SOLVED] Using the CEILING FUNCTION
    By thefallofrome in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-25-2018, 01:39 PM
  3. Use of CEILING Function
    By IMA_Saihat in forum Tips and Tutorials
    Replies: 3
    Last Post: 04-12-2015, 05:17 AM
  4. IF and CEILING function in one cell
    By tomcee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2012, 07:07 AM
  5. Replies: 2
    Last Post: 09-19-2012, 11:44 AM
  6. Ceiling function help
    By danjstock in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-21-2010, 02:12 AM
  7. CEILING Function
    By jules02 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-26-2009, 01:01 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