(At least that's how I have been using FormulaR1C1 property to put formulas into cells in R1C1 Instead, it would seem to deal with the contents in that range.
The FormulaR1C1 property does not seem to offer the function to tell the program what the range is. If I dim FirstColumn as Integer and dim LastColumn as Integer, this method may allow the first column and last column to be calculated based on, say, any cell in a worksheet that meets certain criteria, regardless of their rows. Worksheets("Sheet1").Columns("B:E").Select What I am looking for is, instead of having a string, putting two Selected by providing the letters of the first and last columns, separated by a colon, e.g. In A1 style, multiple, consecutive columns can be I reckon the problem is more of specifying a range (1) with column numbers (as in R1C1 style) and (2) without row numbers. Hi Albert, Thank you very much for your advice and sorry for the belated reply. If you want to get multiple contiguous columns, you should pass a string with the format "first columnīesides, the following KB article shows some demo about excel range and cell selection and you could have a look. For this, you could have a look at below link. To the excel for developer forum for better support.įor my best help you, if you want to use columns to select a range with two numbers, it would not be allowed.
This forum is about the visual basic development and according to your new response I think your need is more related to the excel development, you’d better post it > What I am looking for is, instead of having a string, putting two numbers in those brackets. > I reckon the problem is more of specifying a range (1) with column numbers (as in R1C1 style) and (2) without row numbers. Thank you very much for your advice and sorry for the belated reply.