Home Counting rows and columns for named ranges in vba
Reply: 0

Counting rows and columns for named ranges in vba

user716
1#
user716 Published in April 27, 2018, 6:43 am

I am trying to count the number of rows and columns in vba from a named range in excel. The row and column counts are then used in an 2D array to perform other calculations. The named range is "CF_Inputs" which is from A2:Z60 in a worksheet called "Price_Volumes_Inputs". I can't seem get a row & column count using named ranges, so I used the code below with the offset method to count rows and columns. Is there a way to do this using the actual named range? I'm new to the whole programming thing, so I apologize for the simple question.

Dim Inputs As Variant    
Sheets("Price_Volumes_Input").Activate

Inputs = Range("A2", Range("Z2").End(xlDown).End(xlToRight)) 
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.359512 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO