Look up array: ignoring values in between parentheses

E1 calling

New Member
Joined
Jul 18, 2011
Messages
25
Hello,

When using the vlookup formula (or alternatively a combination of the index and match formula) what should I add to the formula if the look up array contains:
- values in between parenthesis
- hyvens
All these values should be ignored in the vlookup.

Example of the look up array:
29 (+1)
17 (+1)
4 (-1)
2
12
-
1
3
11 (+1)
13 (-2)
2
1
21 (-7)

The values which matter are:
29
17
4
2
12
0
1
3
11
13
2
1
21

Any takers?

All your help will be highly appreciated.

Many thanks.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
There is probably not match you can do wth the lookup array but you can create a new column next to the existing one and trim the values in paranthesis:
=IF(ISNUMBER(FIND("(",A1)),TRIM(LEFT(A1,FIND("(",A1)-1)),A1)

Is the hyphen causing any problem in your array?
 
Upvote 0
Avoiding the helper column, you could try:

Code:
=INDEX(E$2:E$14,MATCH(IF(ISNUMBER(A2),A2,IF(A2="-",0,LEFT(A2,FIND(" ",A2)-1)+0)),D$2:D$14,0))

Where E2:E14 contains the values to be returned and D2:D14 is the lookup_array.

Matty
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,827
Members
449,190
Latest member
rscraig11

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