ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count number of cells until blank cell is reached (https://www.excelbanter.com/excel-worksheet-functions/265355-count-number-cells-until-blank-cell-reached.html)

Patrick Hourigan

Count number of cells until blank cell is reached
 
Hey everyone,

I have a list of product lines in column K, and I would like to count the number of cells, or rows, until a blank cell is reached. There is a blank cell when a total is computed for those product lines.

I am working with a pivot table in Excel 2003, so the order of the table is organized by name (column J), then by product line. The total (column L) computed is for each person's name and creates a blank cell in column K before the next persons number of product lines begins.

Since this is a pivot table that will be updated about twice a year, the number of rows will change, which is why I want to count until the first blank cell is hit, then I will have a total for that person, and hopefully this can be done for each person following.

If there is a function(s) that I can use that would be best, otherwise I can try VBA.

Thank you in advance!

wickedchew

Quote:

Originally Posted by Patrick Hourigan (Post 958727)
Hey everyone,

I have a list of product lines in column K, and I would like to count the number of cells, or rows, until a blank cell is reached. There is a blank cell when a total is computed for those product lines.

I am working with a pivot table in Excel 2003, so the order of the table is organized by name (column J), then by product line. The total (column L) computed is for each person's name and creates a blank cell in column K before the next persons number of product lines begins.

Since this is a pivot table that will be updated about twice a year, the number of rows will change, which is why I want to count until the first blank cell is hit, then I will have a total for that person, and hopefully this can be done for each person following.

If there is a function(s) that I can use that would be best, otherwise I can try VBA.

Thank you in advance!

SUMPRODUCT will do the trick.
http://www.bygsoftware.com/Excel/fun...sumproduct.htm


All times are GMT +1. The time now is 06:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com