Using Subtotal to return text?

deacon10

Board Regular
Joined
Aug 9, 2010
Messages
59
Office Version
  1. 365
Hi all,

I am trying to use a vlookup that references a singular text value that is selected by an autofilter.

Is there any way of getting the Subtotal function return a single text result? I know this works for numbers, so the formula below returns 0.
=SUBTOTAL(9,A2:A5)

If not, is there any method of returning a single text value from a list after autofilter has been applied?

Example data -

A1 - Test1 (result of A2, when A2 filtered)

A2 - Test1
A3 - Test2
A4 - Test2
A5 - Test3
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
If I understand you right, you can use a helper column to determine which rows are filtered or not. For example:

Book1
ABCDEF
1Value1Value2Filter flag?Filter value:Apple
21Apple1
32Banana1
43Cherry1
54Date1
65Elderberry1
7
Sheet1
Cell Formulas
RangeFormula
F1F1=INDEX(B2:B10,MATCH(1,C2:C10,0))
C2:C6C2=SUBTOTAL(3,B2)


And after I filter:

Book1
ABCDEF
1Value1Value2Filter flag?Filter value:Banana
32Banana1
54Date1
7
Sheet1
Cell Formulas
RangeFormula
F1F1=INDEX(B2:B10,MATCH(1,C2:C10,0))
C3,C5C3=SUBTOTAL(3,B3)


The helper column can actually be included in the formula, but it makes it a mess.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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