Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default Select a range in a column in currentregion

The number of records varies greatly in my project.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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]"

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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]"

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
select a range in a column jimbo Excel Discussion (Misc queries) 4 December 10th 09 11:46 AM
Select range using row and column number addresses NDBC Excel Discussion (Misc queries) 4 July 22nd 09 06:51 AM
select date range in column garlocd Excel Worksheet Functions 2 July 11th 06 06:23 AM
select a range base on Column A JUAN Excel Programming 3 July 27th 04 07:49 PM


All times are GMT +1. The time now is 10:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"