Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 81
Default combine Vlookup with the Right function

Hi,

Is there a way to combine the Right function with Vlookup?

I have a statement that comes each month with lots of donors numbers
identifying their contributions. Here is an example:
501257-287640

The last six digits are unique to individual donors. I'd like to use Vlookup
to identify their contribution each month.

I need a formula that might look something like this, but this is pretty
lame and doesn't work.
=VLOOKUP(287640,RIGHT(Data!I20:P250,6),4,FALSE)

I've tried a few other combinations but to no avail. Is there anyway to
rearrange this combination to make it work? I'd prefer not to have to run a
macro to do it.

Thanks for any advice you can offer.

Harold


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default combine Vlookup with the Right function

Your formula is looking for a number in a range of text values. That makes a
difference to Excel.

To allow for Donor Numbers beginning with zero, I'd search for a text value
in the range of text values.

=VLOOKUP("287640",INDEX(RIGHT(I20:P250,6),0),4,FAL SE)

Note: the INDEX function with zero as its 2nd argument causes the formula to
mimick an array formula, even though you commit the formula with ENTER.

This ARRAY FORMULA version (without the INDEX function) requires that you
commit it with CTRL+SHIFT+ENTER.
=VLOOKUP("287640",RIGHT(I20:P250,6),4,FALSE)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Harold Good" wrote:

Hi,

Is there a way to combine the Right function with Vlookup?

I have a statement that comes each month with lots of donors numbers
identifying their contributions. Here is an example:
501257-287640

The last six digits are unique to individual donors. I'd like to use Vlookup
to identify their contribution each month.

I need a formula that might look something like this, but this is pretty
lame and doesn't work.
=VLOOKUP(287640,RIGHT(Data!I20:P250,6),4,FALSE)

I've tried a few other combinations but to no avail. Is there anyway to
rearrange this combination to make it work? I'd prefer not to have to run a
macro to do it.

Thanks for any advice you can offer.

Harold



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 81
Default combine Vlookup with the Right function

Very impressive Ron, I hadn't realized that I was getting in arrays here.
But I tried both your formulas and they both work, just as you said.

I'd never heard of the Index as an array with that 2nd argument.

Thanks for the lesson! I'm off an running now.
Harold

===========================
"Ron Coderre" wrote in message
...
Your formula is looking for a number in a range of text values. That
makes a
difference to Excel.

To allow for Donor Numbers beginning with zero, I'd search for a text
value
in the range of text values.

=VLOOKUP("287640",INDEX(RIGHT(I20:P250,6),0),4,FAL SE)

Note: the INDEX function with zero as its 2nd argument causes the formula
to
mimick an array formula, even though you commit the formula with ENTER.

This ARRAY FORMULA version (without the INDEX function) requires that you
commit it with CTRL+SHIFT+ENTER.
=VLOOKUP("287640",RIGHT(I20:P250,6),4,FALSE)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Harold Good" wrote:

Hi,

Is there a way to combine the Right function with Vlookup?

I have a statement that comes each month with lots of donors numbers
identifying their contributions. Here is an example:
501257-287640

The last six digits are unique to individual donors. I'd like to use
Vlookup
to identify their contribution each month.

I need a formula that might look something like this, but this is pretty
lame and doesn't work.
=VLOOKUP(287640,RIGHT(Data!I20:P250,6),4,FALSE)

I've tried a few other combinations but to no avail. Is there anyway to
rearrange this combination to make it work? I'd prefer not to have to run
a
macro to do it.

Thanks for any advice you can offer.

Harold





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default combine Vlookup with the Right function

I'm glad that worked for you, Harold....Thanks for letting me know.


***********
Regards,
Ron

XL2002, WinXP


"Harold Good" wrote:

Very impressive Ron, I hadn't realized that I was getting in arrays here.
But I tried both your formulas and they both work, just as you said.

I'd never heard of the Index as an array with that 2nd argument.

Thanks for the lesson! I'm off an running now.
Harold

===========================
"Ron Coderre" wrote in message
...
Your formula is looking for a number in a range of text values. That
makes a
difference to Excel.

To allow for Donor Numbers beginning with zero, I'd search for a text
value
in the range of text values.

=VLOOKUP("287640",INDEX(RIGHT(I20:P250,6),0),4,FAL SE)

Note: the INDEX function with zero as its 2nd argument causes the formula
to
mimick an array formula, even though you commit the formula with ENTER.

This ARRAY FORMULA version (without the INDEX function) requires that you
commit it with CTRL+SHIFT+ENTER.
=VLOOKUP("287640",RIGHT(I20:P250,6),4,FALSE)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Harold Good" wrote:

Hi,

Is there a way to combine the Right function with Vlookup?

I have a statement that comes each month with lots of donors numbers
identifying their contributions. Here is an example:
501257-287640

The last six digits are unique to individual donors. I'd like to use
Vlookup
to identify their contribution each month.

I need a formula that might look something like this, but this is pretty
lame and doesn't work.
=VLOOKUP(287640,RIGHT(Data!I20:P250,6),4,FALSE)

I've tried a few other combinations but to no avail. Is there anyway to
rearrange this combination to make it work? I'd prefer not to have to run
a
macro to do it.

Thanks for any advice you can offer.

Harold






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
Combine Vlookup and Hlookup serge Excel Worksheet Functions 1 March 12th 07 03:35 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
How do I combine If and VLookup function? Felicia Pickett Excel Worksheet Functions 2 December 14th 05 12:06 AM
How to combine a vlookup with a sumif function!!! Mark the Shark Excel Discussion (Misc queries) 2 April 6th 05 11:54 AM
Combine VLOOKUP, IF, AND in one formula Natalie Excel Worksheet Functions 5 April 5th 05 02:32 PM


All times are GMT +1. The time now is 07:28 AM.

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

About Us

"It's about Microsoft Excel"