+ Reply to Thread
Results 1 to 12 of 12

Calculate Mod of number on cell with condition

Hybrid View

  1. #1
    Registered User
    Join Date
    10-04-2013
    Location
    London
    MS-Off Ver
    2007
    Posts
    9

    Talking Calculate Mod of number on cell with condition

    Hi guys,

    I need help on formular

    I have a finger table on DHT (Broadcasting Network), on the cell C6 i have number 522 and i want to display the result on D6 . Condition of this formular is " If the number on cell C6 is over OR equal 513, that number will be moded with 512".


    Thanks guy

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702

    Re: Calculate Mod of number on cell with condition

    What result do you want if C6 < 522?
    Audere est facere

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Calculate Mod of number on cell with condition

    What result do you want if C6 is NOT over OR equal [to] 513?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    10-04-2013
    Location
    London
    MS-Off Ver
    2007
    Posts
    9

    Re: Calculate Mod of number on cell with condition

    Sr guy, let me paraphase it,


    if a+b =513 or over, then the formula (a+b mod 512) will b used -> The number is on Cell C6 . Fomular has to be typed on D6 , this is where the result is displayed

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Calculate Mod of number on cell with condition

    Maybe this...

    =IF(C6>=513,MOD(C6,512),0)

  6. #6
    Registered User
    Join Date
    10-05-2013
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Calculate Mod of number on cell with condition

    henry220,

    If I understand your request, the following formula should work for you:

    =IF(C6>=513,512,C6)

    If C6 is 512 or less, D6 will display the number located in C6. If C6 is 513 or higher, D6 will display 512.

    Thanks,
    Cirenav

  7. #7
    Registered User
    Join Date
    10-04-2013
    Location
    London
    MS-Off Ver
    2007
    Posts
    9

    Re: Calculate Mod of number on cell with condition

    Thanks it work, thanks again guys

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Calculate Mod of number on cell with condition

    You're welcome. Thanks for the feedback!

  9. #9
    Registered User
    Join Date
    10-04-2013
    Location
    London
    MS-Off Ver
    2007
    Posts
    9

    Re: Calculate Mod of number on cell with condition

    Sr last question :D.

    How can you do this function within 1 cell: if A1 >=0, then display 0, else if A1 >=5, then display 5, else if A1>=10, then display 10. I dont really know how to combine all the function into 1 cell only

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Calculate Mod of number on cell with condition

    =LOOKUP(A1,{0,5,10}) would do it
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  11. #11
    Registered User
    Join Date
    10-04-2013
    Location
    London
    MS-Off Ver
    2007
    Posts
    9

    Re: Calculate Mod of number on cell with condition

    It doesnt work if all these 3 number is on the cell and dynamically changing upon the result from another Sheet . Because on my sheet i have like 5 cells have numbers linked from another sheet , and i have to combine the fomular to do "if A1 >=0, then display 0, else if A1 >=5, then display 5, else if A1>=10, then display 10 ".

    Lookup command doesnt allow me to click on Cell , i have to type manually which is not possible to achive the task
    Any idea guys
    Last edited by henry220; 10-05-2013 at 11:13 AM.

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Calculate Mod of number on cell with condition

    what???????????
    Lookup command doesnt allow me to click on Cell ,
    what does that mean?
    alternative is
    =IF(A1>=10,10,IF(A1>=5,5,IF(A1>=0,0,"")))
    Last edited by martindwilson; 10-05-2013 at 12:59 PM.

+ 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: 1
    Last Post: 07-18-2013, 10:11 AM
  2. Replies: 1
    Last Post: 06-03-2013, 06:22 AM
  3. Auto Calculate Based on cell meeting a condition
    By thedeadzeds in forum Excel General
    Replies: 5
    Last Post: 03-09-2012, 04:27 AM
  4. Replies: 3
    Last Post: 01-22-2012, 11:12 AM
  5. Calculate Adjacent Cell based on a Condition
    By Eamonn in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-13-2011, 11:05 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