+ Reply to Thread
Results 1 to 6 of 6

Multiples of a # formula

  1. #1
    Registered User
    Join Date
    09-05-2008
    Location
    Bay Area
    Posts
    14

    Multiples of a # formula

    Is it possible to have a forumla that gives a True or False (perferably if it's possible for a conditional formatting to change colors) for multiples of a number.
    I would input a number in the cell and it would change the cell color if it not a multiple of say for example 13.
    Last edited by Alpha Zero; 10-15-2008 at 06:25 PM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Does this work

    =MOD(A1,13)=0
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    09-05-2008
    Location
    Bay Area
    Posts
    14
    Let me attach a mock up of what I am trying to accomplish.
    That works just fine, but I'm trying to make it look a bit more refined.
    I guess if what I'm trying to get doesn't work, then I can work with that.

    EDIT: Ok, on the attachment, depending on what item you input into the screen, there are different ordering requirements. I want the QTY cell to change color to RED if the QTY inputed is not a correct QTY. I would probably have to modify the way the order requirements are listed, but that's fine, as long as the end result is the field turning red when the entered amount is incorrect.
    Attached Files Attached Files
    Last edited by Alpha Zero; 10-13-2008 at 03:03 PM.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    Let's say you put the multiple, if any, in J3:J8, e.g. for your example J5 would be 25 and J6 would be 20.....and in K3:K8 you put the minimum order, if any, e.g. for your example K7 would be 50.

    Then to highlight any values in B3:B8 which don't meet both requirements, select that range and use this formula within conditional formatting

    =OR(MOD(B3,J3)<>0,B3<K3)

    format as required > OK

  5. #5
    Registered User
    Join Date
    09-05-2008
    Location
    Bay Area
    Posts
    14
    That works only if I manually input it into the field. Is there a way to do that when the information is pulled from a different sheet? I've made the neccessary changes to the test sheet.
    As not the same items are ordered each time, this order entry sheet is for inputing only the items being ordered this specific time. It then pulls the description and order requirements from a different sheet. The problem I think it runs into is that if the information is blank, it automatically fills it with a 0.

    2ND EDIT: I got it working. Just needed to split the formula into two and add both for the conditional formating!
    THANKS A BUNCH!

    3RD EDIT: Ok, it doesn't work. lol
    Attached Files Attached Files
    Last edited by Alpha Zero; 10-13-2008 at 05:19 PM.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    Your column H in PO summary is text formatted [ you can verify that by putting this formula in any cell =ISNUMBER(H5)]

    Because of that you are not getting the correct results for the comparison with column K [any text is deemed to be greater than any number].

    You could remedy that by changing the formula in K3 to

    =VLOOKUP(A3,'PO Summary'!A5:H9,8,0)+0

    The +0 at the end converts a text formatted number to a true number....

+ 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. Formula for bond price
    By Dracan in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-15-2014, 11:17 AM
  2. A formula template
    By ajaysehgal in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-07-2013, 06:12 AM
  3. Reset Formula without Editing Formula?
    By Ogey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2007, 08:44 PM
  4. Conditional formula question
    By odditie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-27-2007, 09:47 PM
  5. use cell content as cell address in formula
    By nnsc in forum Excel General
    Replies: 4
    Last Post: 11-05-2006, 03:12 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