Forum Discussion
Using VLOOKUP and TRIM
- Feb 03, 2023
=TRIM(A1)
You can apply this formula in cell C1 and copy it down. Then you can copy the entire range e.g. C1:C1147 and paste only values. In the example i've pasted only values in column D but you can paste only values in column A as well. Then you can delete all the TRIM formulas from column C.
=VLOOKUP("*"&B3&"*",Rates!$A$1:$B$1147,2,FALSE)
You can try this formula. It seems that in the "Rates" sheet the city is entered along with the state e.g. " Cleveland, OH" or "Columbus, OH " or " Cincinnati, OH " whereas in the "January 2023" sheet there is "Cleveland" or "Columbus" or "Cincinnati".
Sheet "January 2023"
Sheet "Rates"
- johnsboxftmFeb 03, 2023Brass ContributorI will give it a try. As for the TRIM function ... I want to remove the extra spaces. Do I have to do that for each individual line or can I do the entire column?
- OliverScheurichFeb 03, 2023Gold Contributor
=TRIM(A1)
You can apply this formula in cell C1 and copy it down. Then you can copy the entire range e.g. C1:C1147 and paste only values. In the example i've pasted only values in column D but you can paste only values in column A as well. Then you can delete all the TRIM formulas from column C.