Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA: find number of columns in named range?
In a spreadsheet, I can use '= columns(Range1)' to get the number of
columns in Range1. I'm having trouble doing this in a VBA script. I tried 'worksheetfunction(columns(...)), but this seems to be looking for some sort of (row,col) args. Thanks, George |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA: find number of columns in named range?
MsgBox Range("range1").Columns.Count "George" wrote: In a spreadsheet, I can use '= columns(Range1)' to get the number of columns in Range1. I'm having trouble doing this in a VBA script. I tried 'worksheetfunction(columns(...)), but this seems to be looking for some sort of (row,col) args. Thanks, George |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
find number of columns in named range?
range("A1:H10").Columns.Count
as an example -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "George" wrote in message ... In a spreadsheet, I can use '= columns(Range1)' to get the number of columns in Range1. I'm having trouble doing this in a VBA script. I tried 'worksheetfunction(columns(...)), but this seems to be looking for some sort of (row,col) args. Thanks, George |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA: find number of columns in named range?
On Mon, 30 Apr 2007 08:56:03 -0700, Toppers
wrote: MsgBox Range("range1").Columns.Count Thanks. G "George" wrote: In a spreadsheet, I can use '= columns(Range1)' to get the number of columns in Range1. I'm having trouble doing this in a VBA script. I tried 'worksheetfunction(columns(...)), but this seems to be looking for some sort of (row,col) args. Thanks, George |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to find the number of value within a range? | Excel Worksheet Functions | |||
How to find the number of value within a range? | Excel Discussion (Misc queries) | |||
Number of Rows & Columns in a Named Range | Excel Discussion (Misc queries) | |||
inserting a named range into new cells based on a named cell | Excel Discussion (Misc queries) | |||
How to find all formulas that used a certain named range | Excel Discussion (Misc queries) |