SOLVED

Use compass directions in two columns to get data in a third

%3CLINGO-SUB%20id%3D%22lingo-sub-2311579%22%20slang%3D%22en-US%22%3EUse%20compass%20directions%20in%20two%20columns%20to%20get%20data%20in%20a%20third%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2311579%22%20slang%3D%22en-US%22%3E%3CP%3EHowdy!%20In%20the%20attached%20sheet%2C%20I'd%20like%20to%20automate%20the%20data%20in%20f28-33%20using%20what's%20been%20input%20in%20b28-33%20and%20d28-33.%20I%20could%20use%20some%20assistance%20as%20I%20am%20at%20my%20self%20help%20limit%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EShane%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2311579%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2311691%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20compass%20directions%20in%20two%20columns%20to%20get%20data%20in%20a%20third%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2311691%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1041998%22%20target%3D%22_blank%22%3E%40ShaneMellard%3C%2FA%3E%26nbsp%3BNot%20very%20elegant%2C%20but%20this%20could%20work%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DSWITCH(MID(B28%2CFIND(%22'%22%2CB28)%2B2%2C1)%26amp%3BMID(D28%2CFIND(%22'%22%2CD28)%2B2%2C1)%2C%22NE%22%2C%22SW%22%2C%22NW%22%2C%22SE%22%2C%22SE%22%2C%22NW%22%2C%22SW%22%2C%22NE%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Howdy! In the attached sheet, I'd like to automate the data in f28-33 using what's been input in b28-33 and d28-33. I could use some assistance as I am at my self help limit

 

Thanks,

Shane

 

3 Replies
best response confirmed by ShaneMellard (New Contributor)
Solution

@ShaneMellard Not very elegant, but this could work:

=SWITCH(MID(B28,FIND("'",B28)+2,1)&MID(D28,FIND("'",D28)+2,1),"NE","SW","NW","SE","SE","NW","SW","NE")

 

@ShaneMellard 

 

Here's a formula that works on the basis of the assumption that you always have the North/South orientation in column B, the East/West in Column D. 

=IF(A28="","",(IF(RIGHT(B28,3)="rth","S","N")&IF(RIGHT(D28,4)="East","W","E")))

 

The outer most IF condition just keeps column F blank if column A is blank.

Beyond that, since "North" and "South" have three distinctive characters as their last three, it's easiest to just look for "rth" or "uth"--again, assuming you always have North or South in that column, and if it finds it's the North, then it reverses to "S"

and concatenates that with a similar IF condition that returns "W" if the word is "East" and vice-versa.

 

P.S. You appear to have formatted all those cells as "Text" which initially made it hard to enter a formula there. Unless there's some compelling reason to do that, don't. Keep them "General" until forced to change, and then do it cell by cell, or row by row or column by column as needed.