Formula help

tispivey

New Member
Joined
Mar 10, 2022
Messages
30
Office Version
  1. 365
Platform
  1. Windows
Hello all,

I have a couple issues I need help with. I am attempting to populate data into Column D and G in the attached spreadsheet.

The formulas I have, pulls the code from A, compares it to H, and returns what is in I into C. When I attempt to pull the rows that have multiple codes, and populate into D, it gives me an error because there are spaces at the end of the code in A. If I manually remove them, it works, but when I attempt to add TRIM, it doesn't do anything, so I get an error.

The same thing is happening when I attempt to do the same for column G for the ones with three codes. There are a couple in row B that have 4 different codes that I am going to work on that once I get this under control.

Any help you all can provide would be greatly appreciated.

I am hoping this sheet has enough data for you guys, because there are almost 300 lines, and the addon wouldn't let me add them all.

The picture I attached is what I see, as when I uploaded it, it doesnt look like you got the same format.

Test1234.xlsx
ABCDEFGHIJK
1TC REASONCOMPL CDEREASON DESCPTREASON DESCPT 2FIX CDFIX CD 2FIX CD 3REASON KEYCharge Back CodeCharge Back Description
2WN 151WIFI NOT WKGRE-AUTH WIFI  TBBUS TBL CALL165-48 V FAILURE
3WN 151WIFI NOT WKGRE-AUTH WIFI  1T1 TV906A/B SWITCH
4CVIN 419CNV/DCT PROBLEMREPL TIVO MINI  EOECHO904A/O INSTALLED
5CVIN 419CNV/DCT PROBLEMREPL TIVO MINI  SVSAVE PROGRAM905A/O RECONNECTED
6DP 453DVR PROJECTRPL INT PASSIVE  SDSATELLITE DISH312ADD HSE AMP
7DP 453DVR PROJECTRPL INT PASSIVE  PVPPV NOT WORKING434ADD/REM TRAP
8MA 354450439MDM NOT ACQUIRECHNG ROUTER LOCUNAUTH HOOK UP$ MSMODEM SLW SPEED404ADJUST TV SET
9EN 435EMTA NO BLK SNCRPL EXT CORD  OMONE MOMENT PLS405ADJUST VCR
10MA 370MDM NOT ACQUIREREPLACE EMTA SL  NPNO PICTURE311ANIMAL CHEW
11MA 370MDM NOT ACQUIREREPLACE EMTA SL  HCHSD NEW CONNECT503AUDIT ERROR
12MA 370MDM NOT ACQUIREREPLACE EMTA SL  TOTIVO114CABLE SUCK OUT
13MA 370MDM NOT ACQUIREREPLACE EMTA SL  THHSD TROUBLE CALL12CANCEL @ PRECLL
14MA 370MDM NOT ACQUIREREPLACE EMTA SL  PCPHONE NEW CONNECT5CANCEL AT DOOR
15OM 429ONE MOMENT PLSTIVO SVC ACCT  QIMUST-DO TC HSD DTA34CANCEL AT DOOR$
16MA 432MDM NOT ACQUIRERPL EXT PASSIVE  7T7 TVS11CANCEL BY OFFCE
17AO 050ADDITIONALREF TO INSTALL  DCDAMAGED CABLE7CANCEL BY OFFIC
18TO 428TIVOREPR TIVO BDBND  VOVOD NOT WORKING8CANCEL@PRECALL
19MA 051439MDM NOT ACQUIREREF TO MAINT  DTDTA PROBLEM10CANCELLD BY SUB
20IM 151INTR MOD NO ACQRE-AUTH WIFI  EIEMTA INT BL SNC6CANCELLD BY SUB
21IM 151INTR MOD NO ACQRE-AUTH WIFI  BPBUS PHONE354CHNG ROUTER LOC
22MA 439MDM NOT ACQUIRERPL GROUND BLCK  3T3 TVS166CMTS
23MA 431451MDM NOT ACQUIREREPAIR EXT DRPNO PROBLEM FND GHGHOSTING134COMM POWER
24MA 151MDM NOT ACQUIRERE-AUTH WIFI  H5HM CAMERA102COMML PWR FAIL
25MA 438MDM NOT ACQUIREDISCO IN ERROR  SISELF INSTALLATION350CONF WLESS CST$
26MA 438MDM NOT ACQUIREDISCO IN ERROR  8T8 TVS117CRACKED SHIELD
27MA 151MDM NOT ACQUIRERE-AUTH WIFI  DDDWN OR LOW DROP38CUST EDUCATION$
28MA 430MDM NOT ACQUIREREPLACE EXT DRP  VPVCR PROBLEM36CUST INSTAL EQ$
29MA 430MDM NOT ACQUIREREPLACE EXT DRP  RCREMOTE PROBLEM407CUST INSTALD EQ
30MA 051MDM NOT ACQUIREREF TO MAINT  IPINTERMITTENT PRB218CUST PHONE PROB
31MA 051MDM NOT ACQUIREREF TO MAINT  SGSIGNAL LEAK - HOME400CUSTOMER EDUCAT
32MA D30 MDM NOT ACQUIRE   WNWIFI NOT WKG146CUT/DAMAGED FIB
33SC 051SNGL CHANL OUTREF TO MAINT  LWLOW CHAN PROB120CUT/DMGD FIBER
34DP 050DVR PROJECTREF TO INSTALL  CMCUSTOMER IMPACT MAINTD30D3 SWAP
35DP 050DVR PROJECTREF TO INSTALL  AUFIELD AUDIT406DEFECTVE A/B SW
36MA 051453MDM NOT ACQUIREREF TO MAINTNO ADULT CVCNV/DCT PROBLEM306DIRECT P/U DROP
37IM 434432INTR MOD NO ACQADD/REM TRAPOK ON TEST SET CICLI402DIRECTP/USUB EQ
38AO 437ADDITIONALRPL EXT F CONN  BIBUS INTERNET910DISCO AT TAP
39OM 417ONE MOMENT PLSREPL TIVO Q  BSBUS SITE SURVEY500DISCO IN ERROR
40AO 437ADDITIONALRPL EXT F CONN  CECUSTOMER EDUC438DISCO IN ERROR
41OM 417ONE MOMENT PLSREPL TIVO Q  BDBURY DROP911DISCONNECT A/O
42IM 051434082INTR MOD NO ACQREF TO MAINTREPL HM CAMERA 9T9 TVS902DROP RECONNECT
43MA 432434431MDM NOT ACQUIRERPL EXT PASSIVE  MCMUST-DO TC VIDEO304DROP PASSIVE
44MA 051438432MDM NOT ACQUIREREF TO MAINT  DADISASTER903DROP RELOCATE
45NP NO PICTURE   TPTAP DISCONNECT301DROP/GNDBLK-TV
46MA 039MDM NOT ACQUIRETEL/HC NOT HOME  PRPHONE RECONNECT300DROP/TAP-GNDBLK
47MA MDM NOT ACQUIRE   MRMDVR PROBLEM108FEEDER ACTIVES
48IM 434437INTR MOD NO ACQADD/REM TRAPCANCEL BY OFFIC MAMDM NOT ACQUIRE110FEEDER CABLE
49MS 437MODEM SLW SPEEDRPL EXT F CONN  LSLST/DIST SPEECH109FEEDER PASSIVES
50MA MDM NOT ACQUIRE   ININSTALLFOLLOWUP111FEEDERCONNECTOR
Sheet1
Cell Formulas
RangeFormula
E2:E50E2=IFERROR(IF(VALUE(B2)=$J$1," ",VLOOKUP(VALUE(LEFT(B2,3)),J:K,2,0)),"")
F2:F50F2=IFERROR(IF(VALUE(B2)=$J$1," ",VLOOKUP(VALUE(MID(B2,6,3)),J:K,2,0)),"")
G2:G50G2=IFERROR(IF(VALUE(B2)=$J$1," ",VLOOKUP(VALUE(RIGHT(B2,3)),J:K,2,0)),"")
C2:C50C2=VLOOKUP(LEFT(A2,2),H:I,2,0)
 

Attachments

  • 1234.PNG
    1234.PNG
    55.2 KB · Views: 9
to be honest i don't know , as i'm not sure what you are trying to do yet,
if you could pick some examples where the code does not match and explain what you expect to happen
I suspect it maybe you say CODES , plural , and that maybe more than i 2 character code is enter

Highlighted in column A

CVIN
MAWN
AOTO
etc

should these be 2 codes
CV
IN
MA
WN
AO
TO

and is that the issue - NOT the spaces
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I finally figured it out. I had to completely rework my formula.

Thank you for the help.

This is the formula that worked, just had a ton of WTF moments getting there.

=IFERROR(IF(LEN(TRIM(B2))>=9,VLOOKUP(VALUE(TRIM(MID(B2,7,3))),M:N,2,0),""),"")
 
Upvote 0
Solution
glad you are now sorted, and thanks for taking the time to show a solution, for other people searching for a similar situation
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,849
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top