ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Counting selected cells (https://www.excelbanter.com/excel-programming/438976-counting-selected-cells.html)

Wendy

Counting selected cells
 
Hi

How do I count how many cells the command Range(Selection,
Selection.End(xlToRight)).Select has selected?

Thanks

Wendy

Jacob Skaria

Counting selected cells
 
Try

Msgbox Range(Selection, Selection.End(xlToRight)).Cells.Count

--
Jacob


"Wendy" wrote:

Hi

How do I count how many cells the command Range(Selection,
Selection.End(xlToRight)).Select has selected?

Thanks

Wendy


Tim Williams[_2_]

Counting selected cells
 
After running that line it would just be

Selection.Cells.Count

Tim


"Wendy" wrote in message
...
Hi

How do I count how many cells the command Range(Selection,
Selection.End(xlToRight)).Select has selected?

Thanks

Wendy





All times are GMT +1. The time now is 12:34 AM.

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