+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    02-14-2005
    Posts
    69

    Decimals and Wildcards

    Hi All,

    Probably a dumb question, but can you use a wildcard in decimals?

    For example if I want the formula to round up or down depending on the decimal value something like this?

    =IF(A1>"*.8",Ceiling(A1,1),Floor(A1,1)

    If it can be done, how do I do this???

    Rhani

  2. #2
    Valued Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    assuming that you want different things to happen for different decimals, why not have a lookup table that adds or subtracts the right decimal to the whole number

    eg

    .1.........0
    .2.........0
    .3.........0.25
    .4.........0.5
    .5..........5

    if number in A1 = 3.1, decimal is number minus integer of number

    in B1 put =int(A1)+vlookup(A1-int(A1),tablename,2)

  3. #3
    Forum Moderator dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003 & 2007
    Posts
    3,661

    Smile

    Good morning rhani111

    can you use a wildcard in decimals?
    No you can't, but excel provides enough functions for you to find a way round most things. Try this formula :

    =IF(A1-INT(A1)>0.8,CEILING(A1,1),FLOOR(A1,1))

    HTH

    DominicB
    Now available : Ultimate Add-In 2007
    Integrates directly into the Office Excel Ribbon


    Download Ultimate Add-In v1.52 from www.dom-and-lis.co.uk
    90+ Utilities, 200+ Sub utilities last updated 25th April 2008
    Free!!

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