• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA or ??

dtherrian

New Member
Hi Experts!


Here is what i am trying to do. I have a spreadsheet that contains address information assigned to account managers. They are assigned based on a number of factors. Primarily it is based on state. There are a couple of exceptions to the rule and then it is based on state and the first 3 digits of the postal code. The is also one that is based on the state and the market type.


For example

if state = WI. Account Manager = Craig

if state = FL and Postal Code begins with 334. Account Manger = Karly

if state = TX and market type = ED. Account Manager = Lookup


FYI-- lookup is my cue to have to manually look it up in the system.


How would i begin on doing this task? What i would like it to do is put the account manager in the account manager cell for each address.


Thank you in advance Dawn
 
Hi Dawn


Can you upload a sample of your data set. With the table which has your raw data and the table which has your account managers and their associated information. This should help.


Take care


Smallman
 
Hi, dtherrian!


With these assumptions:

a) State in column A

b) Postal code in column B

c) Market type in column C

d) Account manager in column D


Try this in column D:

=SI(A2="WI";"Craig";SI(Y(A2="FL";ENTERO(B2/100)=334);"Karly";SI(Y(A2="TX";C2="ED");"Mr. X";"Lookup"))) -----> in english: =IF(A2="WI","Craig",IF(AND(A2="FL",INT(B2/100)=334),"Karly",IF(AND(A2="TX",C2="ED"),"Mr. X","Lookup")))


Is that what you wanted? If yes, then adjust column references properly, otherwise consider uploading a sample file (including manual examples of desired output if applicable), it'd be very useful for those who read this and might be able to help you. Thank you. Give a look at the green sticky posts at this forums main page for uploading guidelines.


Regards!
 
Back
Top