+ Reply to Thread
Results 1 to 4 of 4

If Integer function

  1. #1
    Registered User
    Join Date
    10-12-2008
    Location
    USA
    Posts
    2

    If Integer function

    Hello. New user here looking for some assistance please.

    I'm trying to write a statement something like:

    B1 = data

    B2=IF(B1/8=0,"",IF(B1/8=INTEGER,B1/8 & "8/8",B1/8+1))

    This is meant to identify which relay on a relay board is associated with the given data. For example if data=3, B2 = 1 3/8 meaning the 3rd relay on board 1. If data = 77, B2 = 10 5/8 meaning the 5th relay on board 10. I could do without the 10, but the 5th relay on that board is important to me.

    In summary, I think my trouble is identifying when the product of B1/8 is an integer. I may also be having trouble combining value and text.

    Well, there it is. I may very well be going about it all wrong.
    Any assistance would be greatly appreciated.
    Last edited by goodtimes; 10-12-2008 at 01:11 PM.

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: If Integer function

    I think the MOD (for the remainder) is your solution
    =ROUNDUP(B1/8,0)&" "&MOD(B1,8)&"/8"
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,972
    The MOD() function will tell you if the remainder of the division is zero:
    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    10-12-2008
    Location
    USA
    Posts
    2

    Talking Thank you

    Thank you so much!! That worked out great. I would never have thought of that.

    I really appreciate your help.

+ 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. How does this code output the coefficients of a trendline?
    By gshock in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-13-2010, 05:54 PM
  2. Modify a Function to add an extra condition
    By King_Quake in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2008, 04:32 PM
  3. Generate Nested folders
    By dgkindy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-01-2008, 03:37 PM
  4. derivatives of a cubic spline
    By johnboy12 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2008, 02:49 AM
  5. Help With Date Calculation Function
    By dvent in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2008, 10:13 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