Return Countif Values

manthony

New Member
Joined
Dec 5, 2016
Messages
40
Hi, I am trying to figure out a formula starting in cell B9 on Sheet1 that will count the number of rows greater than 0 in column V on a different sheet (Sheet2) and then return the first value it counted.

Then in cell B10 a formula that would return the second value counted in column V on Sheet2. Cell B11 would return the third value in column V on Sheet2 and so on until it has returned all values in column V on Sheet2.

In column V of Sheet2 the values are randomly disbursed (for example the first value is in cell V20, the second value is in cell V27, and blank between V20-V27) and not one right after the other. It is unknown how many value will appear and in what rows of column V on Sheet2. Does anyone have any ideas? Thank you in advance for the help.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
In B10 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX(Sheet2!$V$2:$V$100,SMALL(IF(ISNUMBER(Sheet2!$V$2:$V$100),ROW(Sheet2!$V$2:$V$100)-ROW(Sheet2!$V$2)+1),ROWS($B$10:B10))),"")
 
Upvote 0
Hi Aladin,

Your formula works great. Thank you so much.

One last thing, is it possible to modify the formula to get the corresponding value (this time a date) from column A of Sheet2 and have it appear in cell A9? The catch is that in column A every row has a date in it.
 
Upvote 0
Hi Aladin,

Your formula works great. Thank you so much.

One last thing, is it possible to modify the formula to get the corresponding value (this time a date) from column A of Sheet2 and have it appear in cell A9? The catch is that in column A every row has a date in it.

In A9 just enter:

=COUNT(Sheet2!$V$2:$V$100)

This counts the relevant records.

In A10 control+shift+enter, not just enter, and copy down:

=IF(ROWS($A$10:A10)>$A$9,"",INDEX(Sheet2!$A$2:$A$100,SMALL(IF(ISNUMBER(Sheet2!$V$2:$V$100),ROW(Sheet2!$A$2:$A$100)-ROW(Sheet2!$A$2)+1),ROWS($A$10:A10))))

In B10 control+shift+enter, not just enter, and copy down:

=IF($A10="","",INDEX(Sheet2!$V$2:$V$100,SMALL(IF(ISNUMBER(Sheet2!$V$2:$V$100),ROW(Sheet2!$V$2:$V$100)-ROW(Sheet2!$V$2)+1),ROWS($B$10:B10))))
 
Upvote 0

Forum statistics

Threads
1,215,510
Messages
6,125,228
Members
449,216
Latest member
biglake87

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