No announcement yet.

Problem with nested IF AND statements. Things are getting messy...

  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with nested IF AND statements. Things are getting messy...

    Afternoon All!

    I have a question about some nested if statements. The formula has gotten so big i'm having a lot of problems trouble shooting it with my limited experience. Im not even sure all these IF statements are the way to go. Maybe once I tell you what i tried to do it will help: Basically, i have X amount of bins available to ship. I have x amount of trucks. each truck hold X amount of weight and bins. Each truck cannot go over the maximum of 45 bins and 42000 pounds. I am trying to get the "ship per truck" columns to automatically tell how many bins to ship (with a max of 10 bins of each part) per truck going down the list of available bins to ship. I am having trouble getting it to stop skipping lines, or adding where the bins needed is already fulfilled on another truck. Like i said, i'm kind of a newb and the formula has gotten so big i cant trouble shoot it any more. Any help is very much appreciated.

    Attached Files

  • #2

    And you've come across the issues with mega formulas.

    My suggestion would be to break your formula into multiple cells with single references from 1 to just 1 other and then when you have that done and it works .... remake your mega formula but keep the sub cells in hidden columns so that you can adjust formula when needed.

    or simply put ... you know what the formula is supposed to do ... remake it from scratch but not in a mega formula.

    My Favorite New Thing:
    Dynamic Named Ranges

    The alternative for
    "Press Any Key To Continue."

    and we all have one we'd like to use it on

    1. Cross Posting Etiquette
    2. Are You Here To Learn: What Have You Tried?
    3. Your Best Resource to begin learning VBA: RECORD A MACRO . . . Then Study It!