Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
rodgie
 
Posts: n/a
Default vlookup with trim function


I am using a vlookup but the data it is searching is protected. I am
getting a few N/A's returned as there are some blanks after the data
fields. As I cannot insert a column in the searched data (as its
protected) can I use a nested trim somehow? or can it only be done by
copying the data somewhere?

This is my funtion so far (might look a bit messy but works)

=IF(ISBLANK(E10),0,IF(COUNTIF('[data]Sheet1'!$B$2:$D$446,E10),VLOOKUP(TRIM(E10),'[data.xls]Sheet1'!$B$2:$D$446,3,FALSE),"check"))

I think i need the trim before the table array
[data.xls]Sheet1'!$B$2:$D$446 but I cannot figure it out.

Any help would be appreciated.


--
rodgie
------------------------------------------------------------------------
rodgie's Profile: http://www.excelforum.com/member.php...o&userid=35090
View this thread: http://www.excelforum.com/showthread...hreadid=548513

  #2   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default vlookup with trim function


=IF(ISBLANK(E10),0,IF(COUNTIF('[data]Sheet1'!$B$2:$D$446,E10),VLOOKUP(TRIM(E10),'[data.xls]Sheet1'!$B$2:$D$446,3,FALSE),"check"))

Try this alternative, array-entered ..

Place it into the formula bar,
then array-enter the formula by pressing CTRL+SHIFT+ENTER,
instead of just pressing ENTER:

=IF(TRIM(E10)="",0,IF(SUMPRODUCT(--(TRIM([data.xls]Sheet1!$B$2:$B$446)=TRIM(E10)))0,INDEX([data.xls]Sheet1!D$2:D$446,MATCH(TRUE,(TRIM([data.xls]Sheet1!$B2:$B446)=TRIM(E10)),0)),"Check"))

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"rodgie" wrote:

I am using a vlookup but the data it is searching is protected. I am
getting a few N/A's returned as there are some blanks after the data
fields. As I cannot insert a column in the searched data (as its
protected) can I use a nested trim somehow? or can it only be done by
copying the data somewhere?

This is my funtion so far (might look a bit messy but works)

=IF(ISBLANK(E10),0,IF(COUNTIF('[data]Sheet1'!$B$2:$D$446,E10),VLOOKUP(TRIM(E10),'[data.xls]Sheet1'!$B$2:$D$446,3,FALSE),"check"))

I think i need the trim before the table array
[data.xls]Sheet1'!$B$2:$D$446 but I cannot figure it out.

Any help would be appreciated.


--
rodgie
------------------------------------------------------------------------
rodgie's Profile: http://www.excelforum.com/member.php...o&userid=35090
View this thread: http://www.excelforum.com/showthread...hreadid=548513


  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default vlookup with trim function

=index('[data.xls]sheet1'!$d$2:$d$446,
match(e10,trim('[data.xls]sheet1'!$b$2:$b446,0))

is the guts of your lookup.

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.


rodgie wrote:

I am using a vlookup but the data it is searching is protected. I am
getting a few N/A's returned as there are some blanks after the data
fields. As I cannot insert a column in the searched data (as its
protected) can I use a nested trim somehow? or can it only be done by
copying the data somewhere?

This is my funtion so far (might look a bit messy but works)

=IF(ISBLANK(E10),0,IF(COUNTIF('[data]Sheet1'!$B$2:$D$446,E10),VLOOKUP(TRIM(E10),'[data.xls]Sheet1'!$B$2:$D$446,3,FALSE),"check"))

I think i need the trim before the table array
[data.xls]Sheet1'!$B$2:$D$446 but I cannot figure it out.

Any help would be appreciated.

--
rodgie
------------------------------------------------------------------------
rodgie's Profile: http://www.excelforum.com/member.php...o&userid=35090
View this thread: http://www.excelforum.com/showthread...hreadid=548513


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default vlookup with trim function


=IF(ISBLANK(E10),0,IF(COUNTIF('[data]Sheet1'!$B$2:$D$446,E10),VLOOKUP(TRIM(E10),'[data.xls]Sheet1'!$B$2:$D$446,3,FALSE),"check"))
.. i need the trim before the table array [data.xls]Sheet1'!$B$2:$D$446


Try this alternative, array-entered, i.e. press CTRL+SHIFT+ENTER
to confirm the formula (instead of just pressing ENTER):

=IF(TRIM(E10)="",0,IF(SUMPRODUCT(--(TRIM([data.xls]Sheet1!$B$2:$B$446)=TRIM(E10)))0,INDEX([data.xls]Sheet1!D$2:D$446,MATCH(TRUE,(TRIM([data.xls]Sheet1!$B2:$B446)=TRIM(E10)),0)),"Check"))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"rodgie" wrote:
I am using a vlookup but the data it is searching is protected. I am
getting a few N/A's returned as there are some blanks after the data
fields. As I cannot insert a column in the searched data (as its
protected) can I use a nested trim somehow? or can it only be done by
copying the data somewhere?

This is my funtion so far (might look a bit messy but works)

=IF(ISBLANK(E10),0,IF(COUNTIF('[data]Sheet1'!$B$2:$D$446,E10),VLOOKUP(TRIM(E10),'[data.xls]Sheet1'!$B$2:$D$446,3,FALSE),"check"))

I think i need the trim before the table array
[data.xls]Sheet1'!$B$2:$D$446 but I cannot figure it out.

Any help would be appreciated.


--
rodgie
------------------------------------------------------------------------
rodgie's Profile: http://www.excelforum.com/member.php...o&userid=35090
View this thread: http://www.excelforum.com/showthread...hreadid=548513


  #5   Report Post  
Posted to microsoft.public.excel.misc
rodgie
 
Posts: n/a
Default vlookup with trim function


Thanks for the help. With your input ans some tweaking I have it
sorted.

Something alonf the lines of:

=IF(ISBLANK(E11),0,IF(COUNTIF(data!$A$4:$D$446,E11 ),INDEX(data!$A$2:$D$446,MATCH(E11,TRIM(data!$A$2: $A447),0),4),"check"))

but with the ctrl+shift+enter


--
rodgie
------------------------------------------------------------------------
rodgie's Profile: http://www.excelforum.com/member.php...o&userid=35090
View this thread: http://www.excelforum.com/showthread...hreadid=548513



  #6   Report Post  
Posted to microsoft.public.excel.misc
rodgie
 
Posts: n/a
Default vlookup with trim function


Thanks for the help. With your input ans some tweaking I have it
sorted.

Something alonf the lines of:

=IF(ISBLANK(E11),0,IF(COUNTIF(data!$A$4:$D$446,E11 ),INDEX(data!$A$2:$D$446,MATCH(E11,TRIM(data!$A$2: $A447),0),4),"check"))

but with the ctrl+shift+enter


--
rodgie
------------------------------------------------------------------------
rodgie's Profile: http://www.excelforum.com/member.php...o&userid=35090
View this thread: http://www.excelforum.com/showthread...hreadid=548513

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
numerical integration integreat Excel Discussion (Misc queries) 4 May 12th 06 02:40 AM
Advance Vlookup function may help!! PA Excel Worksheet Functions 6 May 7th 06 04:09 AM
vlookup and a function field input Patrick Excel Worksheet Functions 2 April 27th 06 04:38 PM
Help with VLookup function JohnK Excel Worksheet Functions 6 August 22nd 05 12:52 PM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM


All times are GMT +1. The time now is 01:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"