#1
|
|||
|
|||
Formula help
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. |
#2
|
|||
|
|||
Into D2 enter formula
Code:
=IFERROR(VLOOKUP(MID((SUBSTITUTE($A2," ","")),3,2),$H:$I,2,0),"") Use SUBSTITUTE in 2nd formula too! |
#3
|
||||
|
||||
I don't see why the SUBSTITUTE in col D is necessary
Code:
=VLOOKUP(MID(A60,3,2),H:I,2) @tispivey Using entire columns as reference is bad practice Use Excel Tables instead as dynamic reference As for the IFERROR function, do not apply it before you have ascertained that your formula works correctly In this case if you want to hide the NA error, OK, but suppose, for some reason, it returns a VALUE error? IFERROR will hide that also leading to incorrect results IMO the ISNA function is safer
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#4
|
|||
|
|||
That worked! Thank you!
|
#5
|
|||
|
|||
Quote:
|
#6
|
||||
|
||||
Please mark thread as " solved". thx
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#7
|
||||
|
||||
Thanks for the rep
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formula Copy Row 2 Row But Next Column In Formula From Another Tab | TimG | Excel | 3 | 04-16-2018 09:20 PM |
Help with an IF Formula | Cbate | Excel | 1 | 08-17-2017 07:29 AM |
Possible to use an existing vlookup formula to also insert correct info and trigger a SUM formula | innkeeper9 | Excel | 2 | 09-13-2016 08:59 PM |
Need help with dragging a formula and changing a reference column as I drag the formula. | LupeB | Excel | 1 | 10-22-2015 03:02 PM |
WHEN formula | agent007 | Excel | 5 | 02-06-2014 09:20 PM |