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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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