I have never written an advanced formula in excel before and am looking into making a Logical:IF statement/formula but I don't know how. I took some classes in programming 10+ years ago so I can follow the logic somewhat...
I want to write a formula that will tell me how many days it will take the warehouse to deliver to the ship-to state.
Column A I have which Warehouse it is shipping from= "East"(NC) or "West"(CA)
Column B is the state it is shipping to.
Column C is blank but I want it to calculate the days it will take to ship with this formula/macro.
Here is my try at the coding: Can someone help me put it into Excel coding?(== = equal, || = or, // = comment)
IF(A1 == "EAST" && B1 == CA || NV || WY || OR || WA || MT || UT || ID,
then C1 == "5 Days";
ELSEIF(A1 == "EAST" && B1 == ND || SD || NE || CO ||AZ || NM,
then C1 == "4 Days";
ELSEIF(A1 == "EAST" && B1 == KS || IA || MN || WI || OK || AR || TX || MA || RI || ME || NH || VT,
then C1 == "3 Days";
ELSEIF(A1 == "EAST" && B1 == GA || FL || AL || MS || MO || IN || IL || MI || PA || NY || DC || NJ || CT || MD || WV || KY || OH,
then C1 == "2 Days";
ELSEIF(A1 == "EAST" && B1 == VA || NC || SC,
then C1 == "1 Day";
IF(A1 == "WEST" && B1 == RI || CT || VT || NH || NC || SC || VA,
then C1 == "5 Days";
ELSEIF(A1 == "WEST" && B1 == ND || SD || NE || KS || MN || WI || OH || IA || IL || MO || AR || LA || MS || AL || GA, // ETC.ETC.
then C1 == "4 Days";
ELSEIF(A1 == "WEST" && B1 == WA || ID || OR || MT || CO || NM || OK || TX,
then C1 == "3 Days";
ELSEIF(A1 == "WEST" && B1 == NV || AZ || UT,
then C1 == "2 Days";
ELSEIF(A1 == "WEST" && B1 == CA,
then C1 == "1 Day";
Now there are 5,000+ rows also, so would I just drag the formula down into the rows below it? Or is there a better way to write in the code for next row? So it says (A2 == "WEST" && B2 == CA, then C2 ==)(A3/B3, then C3) etc.etc.
I appreciate the help, this forum always gets the best answers according to google!![]()
Bookmarks