Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Why does rngDataSource.Rows.Count = 65536 when worksheet Rows=95?
I took the below example from Jon Peltier's site at http://peltiertech.com/
I have a worksheet with 26 columns and 95 rows. The first row consists of labels and all other rows are numbers. When I highlight any three columns that are not next to each other I get iDataRowsCt=65536 and iDataColsCt=1. When I highlight 4 column that are next to each other I get iDataRowsCt=65536 and iDataColsCt=4. Why is the number of rows=65536 and not equal to 95? Why is he number of columns=1 when the selected columns are not next to each other? ==========From http://peltiertech.com/Excel/ChartsH...kChartVBA.html ================================================== ==================== Sub MultiX_OneY_Chart() Dim rngDataSource As Range Dim iDataRowsCt As Long Dim iDataColsCt As Integer Dim iSrsIx As Integer Dim chtChart As Chart Dim srsNew As Series If Not TypeName(Selection) = "Range" Then '' Doesn't work if no range is selected MsgBox "Please select a data range and try again.", _ vbExclamation, "No Range Selected" Else Set rngDataSource = Selection With rngDataSource iDataRowsCt = .Rows.Count iDataColsCt = .Columns.Count MsgBox "idataRowsCt=" & iDataRowsCt & " iDataColsCt=" & iDataColsCt End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Chart -- How to chart 65536 values in 1 series? | About this forum | |||
Excel should accomodate more number of rows than 65536, to load l. | Excel Discussion (Misc queries) | |||
How can I open a large Excel file with more than 65536 rows? | Excel Discussion (Misc queries) | |||
More than 65536 to new sheet | Excel Worksheet Functions | |||
increasing the number of rows of a worksheet beyond 65536? | Excel Discussion (Misc queries) |