+ Reply to Thread
Results 1 to 7 of 7

If, and or functions used in stock control

  1. #1
    Registered User
    Join Date
    11-04-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    If, and or functions used in stock control

    I would appreciate help using IF, COUNTIF, AND, OR functions The exercise is around stock control and I've attached the stock number spreadsheet which is the basis of the exercise. I know this is really easy for all you but it's making my head hurt! Thank you in advance

    1. Using IF function amend spreadsheet to show (a) which products need ordering (b) how many items needs to be ordered (think we've managed these - F&G)
    2. Using COUNTIF amend stock list to work out how many different products need to be ordered , eg how many different type of bag (not how many of each).
    3. the suppliers will not allow orders for small quantities of products. Orders must be in multiples of 3.
    (See colums N & M for details ) . Usee NESTED IF function to amend your solution so that it shows the quantity or order for each product.
    4. USING OR / AND - exclude any orders that are for products in PINK.
    5. USING OR /and -products in blue are proving popular, so even if you already have enough of a product order extra if it is blue. Amend spreadsheet to show which items now need ordering to include anything Blue.
    Attached Files Attached Files
    Last edited by scruffypupbertie; 11-08-2012 at 10:21 AM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Help with daughter's homework ...please (if, and, or functions)

    We would love to help you with your query, but first, before we can proceed, please see the forum rules about proper thread titles and adjust accordingly...

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    11-04-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Help with daughter's homework ...please (if, and, or functions)

    Hi
    Thank you for the tip. Obviously I'm an inexperienced user. I did change the title though immediately I received your email. Hopefully I will now comply with the guidelines.
    Many thanks.
    Jeanette

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: If, and or functions used in stock control

    Okay, looks like you solved #1 just fine. (except the comment I make later about not putting 0 in quotes)
    #2, COUNTIF (Range to look in, criteria to meet)
    You want to count products you had to order so looking at your data, ordering info is in Column G
    With the criteria. If you want it to be equal to a specific number or equal to what's in a certain cell, you can add that directly
    i.e. = COUNTIF(G4:G39, 1) counts all orders of 1, or COUNTIF(G4:G39, H1) counts all orders based on what you put in H1 (i.e put a 2 in H1, it'll be orders of 2)
    However, you can also use > (greater than), < (less than), >=, <=, <> (not equal to) but those need to be in quotes
    So since we want all orders greater than 0,
    =COUNTIF(G4:G39, ">0")
    Continued on next post
    Last edited by ChemistB; 11-08-2012 at 11:38 AM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Help with daughter's homework ...please (if, and, or functions)

    #3. Nested IF's isn't the best way to do this (MROUND or VLOOKUP would be better) but the teacher is always right.
    Nested IF's are IF's inside of IFs.
    So let's modify your first IF
    =IF(E4-D4> 0, E4-D4, 0) (Note: You don't want your 0 in quotes, Excel sees it as text if you do that)
    But we don't want just E4-D4, we want to use the criteria you put into M5:N7 so
    =IF(E4-D4>0, IF(E4-D4<= 3, 3, More IFs,0))) can you take it from there?

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Help with daughter's homework ...please (if, and, or functions)

    #4. Using ORs and ANDs. Unlike the English language where we put AND or OR between arguments, with Excel, it preceeds them
    =IF(OR(A1=5, A2 = 3), "Yes", "No") If A1 equals 5 or A2 = 3 (also if both are true) then enter "Yes", otherwise enter "No"
    =IF(AND(A1=5, A2=3), "Yes", "No") If A1 equals 5 and A2 = 3 (both must be true) then enter "Yes"...
    You can have more than two arguments, just separate them with commas)

    So we don't want to order any products in PINK
    So, without switching too much, in the first IF
    "=IF(E4-D4>0," we order something. We want to add something about PINK now
    =IF(AND(e4-D4>0, C4<>"Pink"), .... That says if it's true that E4-D4 is greater than 0 and C4 does not equal Pink, then order

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Help with daughter's homework ...please (if, and, or functions)

    #5 For this one, I'd add use one of the other columns. Looking at your sheet, you have Task 4 in column J
    In K4
    =IF(AND(J4>0, C4="Blue"), J4+3, J4)
    Questions?

+ 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