Forecast

Lakeshore

New Member
Joined
Feb 23, 2013
Messages
2
Hello,
I used following two formulas but not working:
I have one summary sheet with names and some of names has few spaces and other sheet is detail sheet which also have few spaces in front of names, result my vlookup function is not working. I used following but none worked
=IF(ISNA(VLOOKUP(A3,FC!A:B,2,0)),"0",VLOOKUP(A3,FC!A:B,2,0))
=VLOOKUP(A4,INDEX(TRIM(FC!A:B),0,0),2,0)

Hitachi summary has one space in the front and Hitachi in FC has 3 spaces in the front of Hitachi.
Cash summary
WK1
Apple3.4
EMC2.5
Hitachi0

<TBODY>
</TBODY><COLGROUP><COL span=2></COLGROUP>


FC
Apple3.4
EMC2.5
Hitachi4.5

<TBODY>
</TBODY><COLGROUP><COL span=2></COLGROUP>


Thanks,
Lakeshore





<TBODY>
</TBODY><COLGROUP><COL><COL></COLGROUP>
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I think your second formula will work, but you must array enter it to evaluate the trim function for every cell. You array enter the formula by entering the formula as usual, then hitting Control+Shift+Enter all at once, instead of just Enter. Or in this case since the formula already exists, hit F2, then Control+Shift+Enter. Lets use index instead of VLookup though:
=INDEX(FC!B:B,Match(A4,TRIM(FC!A:A),0))
(array entered with control+shift+enter)

I'd prefer to use a dynamic named range to avoid using an entire column in the formula (though I don't really know if it matters or not). If the performance is poor or Excel balks at using an entire column in this formula, try a dynamic named range as explained here:
Excel Function Friday: INDEX for Dynamic Range | Contextures Blog
The basics of named ranges are explained here:
Excel Names -- Excel Named Ranges

With your defined names in place, then instead:
=INDEX(_Company,Match(A4,TRIM(_Amount),0))
(array entered with control+shift+enter - assume the defined names are _Company and _Amount for the company names and the weekly totals.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,428
Members
448,896
Latest member
MadMarty

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