![]() |
Select a range in a column in currentregion
What is the best way to go about dynamically selecting a range in a
column? I've been trying to do it in one line like CurrentRegion.Offset(1,brainfart).FormulaR1C1 = "=RIGHT(RC[2],3)&RC[3]" The number of record varies greatly in my project and I'm trying to keep the amount of time it takes to run to a minimum. Thanks to anyone that can help with this. |
Select a range in a column in currentregion
That code will be efficient, assuming that brainfart is a variable number,
it will select a range the same size as the currentregion offset by 2 columns and 1 row, if that is what you want. You need to specify which currentregion, so you will need to qualify it with a range, such as activecell, or Range("A1") -- HTH Bob Phillips (remove nothere from email address if mailing direct) "ward376" wrote in message oups.com... What is the best way to go about dynamically selecting a range in a column? I've been trying to do it in one line like CurrentRegion.Offset(1,brainfart).FormulaR1C1 = "=RIGHT(RC[2],3)&RC[3]" The number of record varies greatly in my project and I'm trying to keep the amount of time it takes to run to a minimum. Thanks to anyone that can help with this. |
Select a range in a column in currentregion
I want to select a range in a single column within the currentregion -
for example I have a table with a heading and records in a1:d30 and want to fill the first column with a formula or value - Thanks! |
Select a range in a column in currentregion
Why not just
Range("A1:A30").FormulaR1C1 = ... -- HTH Bob Phillips (remove nothere from email address if mailing direct) "ward376" wrote in message ups.com... I want to select a range in a single column within the currentregion - for example I have a table with a heading and records in a1:d30 and want to fill the first column with a formula or value - Thanks! |
Select a range in a column in currentregion
The number of records varies greatly in my project.
|
Select a range in a column in currentregion
Thanks for responding. What I'm after is the value, if possible, to
replace brainfart in - Cells(1, 1).CurrentRegion.Offset(1, brainfart).FormulaR1C1 = "=RIGHT(RC[2],3)&RC[3]" |
Select a range in a column in currentregion
Brainfart gone
Cells(1, 1).CurrentRegion.Offset(1, 0).Columns(1).FormulaR1C1 = "=RIGHT(RC[2],3)&RC[3]" |
All times are GMT +1. The time now is 01:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com