Vlookup Ignoring Hidden Values

Bugas

New Member
Joined
Sep 17, 2012
Messages
44
Office Version
  1. 2007
Platform
  1. Windows
Sometimes my data is hidden and I need to get the values. I don't know how to use SUBTOTAL with a VLOOKUP or IF statement, otherwise it would be easy.

I'm trying to get only the visible scores for different players.


AB
1Aaron10
2Bruce20
3Charlie15
4Aaron25
5Danny10
6Aaron30
7Aaron20
8Freddie30
9
10Aaron10 / 25 / 30 / 20
11

<tbody>
</tbody>


For instance, in the following table for Aaron (A10) I get these results (B10): 10 / 25 / 30 / 20. With a VLOOKUP it would be easy.

However, I need to hide columns 1, 2, 3 and 4. Then for Aaron in this case I would get 30 / 20. For Bruce it would be "".

Without using VBA is there any chance to do it?

Thanks :)
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Can the results be returned in separate cells? If so, try...


Excel 2010
ABCDEFGHIJ
5Danny10
6Aaron30
7Aaron20
8Freddie30
9
10Aaron23020
Sheet1


B10, confirmed with CONTROL+SHIFT+ENTER...

=SUM(IF(SUBTOTAL(103,OFFSET($A$1:$A$8,ROW($A$1:$A$8)-ROW($A$1),0,1))>0,IF($A$1:$A$8=$A10,1)))

C10, confirmed with CONTROL+SHIFT+ENTER, and copied across:

=IF(COLUMNS($C10:C10)<=$B$10,INDEX($B$1:$B$8,SMALL(IF(SUBTOTAL(103,OFFSET($A$1:$A$8,ROW($A$1:$A$8)-ROW($A$1),0,1))>0,IF($A$1:$A$8=$A10,ROW($A$1:$A$8)-ROW($A$1)+1)),COLUMNS($C10:C10))),"")

Note that in addition to manually hidden rows, filtered data will also be reflected in the results.

Hope this helps!
 
Last edited:
Upvote 0
Thanks! It works perfect :)

Can the results be returned in separate cells? If so, try...

Excel 2010
ABCDEFGHIJ
5Danny10
6Aaron30
7Aaron20
8Freddie30
9
10Aaron23020

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1



B10, confirmed with CONTROL+SHIFT+ENTER...

=SUM(IF(SUBTOTAL(103,OFFSET($A$1:$A$8,ROW($A$1:$A$8)-ROW($A$1),0,1))>0,IF($A$1:$A$8=$A10,1)))

C10, confirmed with CONTROL+SHIFT+ENTER, and copied across:

=IF(COLUMNS($C10:C10)<=$B$10,INDEX($B$1:$B$8,SMALL(IF(SUBTOTAL(103,OFFSET($A$1:$A$8,ROW($A$1:$A$8)-ROW($A$1),0,1))>0,IF($A$1:$A$8=$A10,ROW($A$1:$A$8)-ROW($A$1)+1)),COLUMNS($C10:C10))),"")

Note that in addition to manually hidden rows, filtered data will also be reflected in the results.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,390
Members
448,957
Latest member
Hat4Life

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