+ Reply to Thread
Results 1 to 3 of 3

Find greatest multiple of 50 which is less than X

  1. #1
    Registered User
    Join Date
    09-28-2011
    Location
    howard,pa
    MS-Off Ver
    Excel 2003
    Posts
    2

    Find greatest multiple of 50 which is less than X

    I am stuck, I need to write an excel function that will find the location of the end of a section of pipe. If we have a pipe run 320 feet long whch starts at station 110 and extends to station 430, and we are using 50 foot long sections of pipe I need the function to return that the end of the last full section of pipe will be at station 410.

    A1 110 Start Station
    B1 320 Length of Pipe Run
    C1 = A1+B1 End Station
    D1 = ??? End of last full section of pipe

    F1 50 Length of pipe sections

    Unformtunatly I am a visual Basic idioit as my programming knowledge is dated to good old fashion basic and a little of the dreaded Fortran from 20 years ago. Therefore I think VBA is out. Any help would be appreciated.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Find greatest multipul of 50 which is less than X

    If want to calculate without VBA you could use a function.
    For instance, if you have:
    a1: Start Station.................110
    a2: Length of Pipe Run.... 320
    a3: Pipe long section....... 50
    in a4 you can insert the formula:
    =A1+A2-MOD(A2,A3)
    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    09-28-2011
    Location
    howard,pa
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Find greatest multipul of 50 which is less than X

    Thanks! Works great. I was not familiar with the mod command.

+ 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.6.0 RC 1