Showing row/cell references from a countif formula

b19upj

New Member
Joined
Oct 3, 2014
Messages
34
Office Version
  1. 365
Platform
  1. Windows
Hi,

If i perform a countif calculation and the result is 5, how can i find the 5 rows that count formula is referring to so i can then do a vlookup on it and display certain columns from the 5 rows the count found.

I hope that makes sense.

Many thanks
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You need to be a bit more specific on your requirements. What you're asking depends highly on how your sheet is laid out. Here's an example of how it could work though:

Excel 2010
ABCDE
1NameCountCOUNTIFList
2A15A
3B2E
4C3H
5D2J
6E1M
7F3
8G4
9H1
10I4
11J1
12K6
13L7
14M1
15N8
16O7
17P3

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

Worksheet Formulas
CellFormula
D2=COUNTIF(B2:B17,1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
E2{=IF(E1="","",IFERROR(INDEX($A$2:$A$17,SMALL(IF($B$2:$B$17=1,ROW($B$2:$B$17)-ROW($B$2)+1),ROW()-ROW($E$2)+1)),""))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



Your sample COUNTIF is in D2. Then you can enter the formula in E2 with Control-Shift-Enter. Then copy it and paste it down the column.

Let me know if you need help adapting it to your sheet.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,806
Members
449,048
Latest member
greyangel23

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