+ Reply to Thread
Results 1 to 14 of 14

Reducing the amount of If/and statements to give a particular result

  1. #1
    Registered User
    Join Date
    02-08-2014
    Location
    Lethbridge, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    7

    Reducing the amount of If/and statements to give a particular result

    Good afternoon everyone who reads this!

    I apologize for any etiquette rules I'm breaking, because I'm a long time 'lurker' in these forums, but first time poster. With the brilliant minds that cruise these forums, I know someone will be able to help me. I will try to explain what I'm trying to accomplish, without sounding to confusing.

    I have a project for work. We manufacture many different sku's. The way my sheet is set up, I'm unable to use the conventional vlookup function. The cells are spread all over the place. The only way I can figure it out, is to use MANY if/and statements. Here goes.

    1) In particular cells it sums up the amount of cases to be produced for a particular sku.
    2) from those cells, I need to make up a sheet - which I can print an 'order' sheet for the operator.
    3) I never run all the sku's in one day and I don't want to make up a static sheet with ALL the sku's because I will just end up wasting paper that they don't need. We create about 50 different products (sku's) but I don't run even half of them in a particular day, maybe 20 at once.
    4) What I would like - is a statement that will 'scour' my 'sum' cells and add it to the other sheet, but it can't duplicate the sku. Right now I use If/and - "=If(and(c35>,masters!sc35<>c34),masters!c35,if(and(c36>0,masters!c36<>c35,masters!c35,if(and(c37>0,masters!c37<>c36),masters!c36,if(and) - and the list goes on for 50 cells. The next line has the same formula to find the next sku to run that day. As you can see lots of typing for a particular printout.
    5) Hopefully, my explanation makes sense. Thank you too everyone, who takes a chance, helpful or not.

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Reducing the amount of If/and statements to give a particular result

    If you provide a sample workbook it will be easier to help you.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Registered User
    Join Date
    02-08-2014
    Location
    Lethbridge, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Reducing the amount of If/and statements to give a particular result

    here is a quick sheet of what I'm trying to accomplish. not sure how to attach files, hopefully it will work.

    Example.xlsx

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Reducing the amount of If/and statements to give a particular result

    Paste this into a cell, finish with Ctrl + Shift + Enter and copy down as far as needed.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-08-2014
    Location
    Lethbridge, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Reducing the amount of If/and statements to give a particular result

    Jacc,
    Pasted the suggested formula. All returns are an "-", not quite what I was expecting. Obviously, by your formula, you are quite skilled in the language of excel. I've never used some of the commands you do, so I'm going to take a little time and break each part down to see if I can figure out what they are doing. I appreciate your help, if your surfing the forum in the next week, check back, I will post how I made out, or maybe you can help me again. PS - Nice medal standing at Sochi!

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

    Re: Reducing the amount of If/and statements to give a particular result

    did you array enter it as directed? with ctrl+shift+enter?
    http://www.cpearson.com/excel/ArrayFormulas.aspx
    "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

  7. #7
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Reducing the amount of If/and statements to give a particular result

    Well, have a look at this.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-08-2014
    Location
    Lethbridge, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Reducing the amount of If/and statements to give a particular result

    Absolutely brilliant! Exactly what I was looking for. My fingers and keyboard are most grateful!

  9. #9
    Registered User
    Join Date
    02-08-2014
    Location
    Lethbridge, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Reducing the amount of If/and statements to give a particular result

    The array approach works perfectly on my example, but I can't wrap my head around how to change it to handle the full project. Is it possible to use the same approach on a larger version, where the cells are spread througout the workbook? I've attached 2 sheets from my actual project to better explain.

    1) The print sheet starts at cell T88, and continues to T148. You'll notice the returned SKU by array formula will be returned every 3 rows. With the 2 other rows formulating from the result cell.
    2) Cell C1 allows me to choose a particular product we are running. That choice affects the sheet to which sku's we can produce that day. But the sku's are held in different columns. Because cells Q5:Q65 return a result dependant on the choice in C1, which changes, I need the result to come from the 'Masters' sheet, cells T5:AD65. This also includes the '55555' result - which I use for increasing our product line(s) at a later time, instead of re-writing the entire workbook.
    3) Any help is greatly appeciated, any suggestions are greatly appreciated. Thanx to everyone to cruises this forum. The vast knowledge collected here is unmeasureable!

    Thanx to everyone!
    Grandar

    Advanced.xlsx

  10. #10
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Reducing the amount of If/and statements to give a particular result

    Your setup with different kinds of data every other row is very difficult to work with. And merged cells makes matters worse.
    I'm not really sure what to do. Martin?

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

    Re: Reducing the amount of If/and statements to give a particular result

    i've had a look and it made my brain hurt, i cannot see what needs filling in from where!

  12. #12
    Registered User
    Join Date
    02-08-2014
    Location
    Lethbridge, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Reducing the amount of If/and statements to give a particular result

    Hah! My head starting spinning the minute they dumped this task on me! Make up a nice power point presentation, then they assume you can work all kinds of miracles with a spreadsheet. I appreciate the help guru's, but don't knock yourself out. I was hoping that it could be all set into 1 sheet. Worse case, I make it into 3 printable sheets. One for each 'product' type. I do appreciate both of you helping me though. Cheers!

  13. #13
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Reducing the amount of If/and statements to give a particular result

    martin ->

    grandar -> I understand it can be difficult to jump right into Excel and be efficient. It takes some time to get the hang of it. What you could possibly do is post a new thread and ask for help about structuring your data and see what that brings.

  14. #14
    Registered User
    Join Date
    02-08-2014
    Location
    Lethbridge, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Reducing the amount of If/and statements to give a particular result

    Thanx Jacc, I appreciate the advice, that is a good idea. As you can tell by my example, I have always been more about 'form' than 'function'. Martin also thank you! At the very least, I've dipped my toe into the forums, and found out some new excel formulations (arrays), so I can learn a little more. Thanx to all again!

+ 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: 5
    Last Post: 01-25-2014, 05:58 PM
  2. Replies: 1
    Last Post: 01-25-2013, 01:58 PM
  3. Tracking monthly payments and reducing the total by the amount of each payment.
    By easy365online in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-02-2012, 10:15 AM
  4. Compacting / reducing number of if statements
    By kayun in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2008, 07:35 AM
  5. Replies: 4
    Last Post: 11-18-2005, 01:35 PM

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