#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Offset


In VB in have cell references to the column and row numbers

example

column = 35

Row = 6

I would like to do a offset type function to select the cell and then
the next 10 columns along.

The result would be AI6:AS6

From here im planning to copy this range and post it somewhere else.

The column references are likley to change alot which is why i cant
just use AI6:AS6


Please can someone help?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=498738

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 180
Default Offset

Range(Selection, Selection.Offset(0,11)).Select


"ceemo" wrote:


In VB in have cell references to the column and row numbers

example

column = 35

Row = 6

I would like to do a offset type function to select the cell and then
the next 10 columns along.

The result would be AI6:AS6

From here im planning to copy this range and post it somewhere else.

The column references are likley to change alot which is why i cant
just use AI6:AS6


Please can someone help?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=498738


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Offset

Use this

Sub test()
Dim Columnnum As Integer
Dim Rownum As Long
Columnnum = 35
Rownum = 6
Cells(Rownum, Columnnum).Resize(1, 10).Select
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"ceemo" wrote in message
...

In VB in have cell references to the column and row numbers

example

column = 35

Row = 6

I would like to do a offset type function to select the cell and then
the next 10 columns along.

The result would be AI6:AS6

From here im planning to copy this range and post it somewhere else.

The column references are likley to change alot which is why i cant
just use AI6:AS6


Please can someone help?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=498738



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Offset


perfect thank you very much


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=498738

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
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Offset Esrei Excel Discussion (Misc queries) 1 February 16th 07 11:42 AM
Offset. Joe Edwards Excel Worksheet Functions 2 November 2nd 06 06:57 AM
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) [email protected] Excel Programming 2 August 22nd 05 05:25 AM
Offset Dave S[_2_] Excel Programming 2 December 12th 03 02:29 PM


All times are GMT +1. The time now is 04:23 PM.

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

About Us

"It's about Microsoft Excel"