Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default range to cell

Hello,
I am writing a program.
I have a excel range object.
And I want to point another cell at this range.
how can I do that?
On the range there is column = 4 row = 3.
but I cannot just say
=4,3
or something like that?
don't you need
=D3?
why is the column D and not 4?
strange


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 5,939
Default range to cell

=sheets("Sheet1").range("D4")
or
=sheets("Sheet1").cells(3, 4)
--
HTH...

Jim Thomlinson


"greg" wrote:

Hello,
I am writing a program.
I have a excel range object.
And I want to point another cell at this range.
how can I do that?
On the range there is column = 4 row = 3.
but I cannot just say
=4,3
or something like that?
don't you need
=D3?
why is the column D and not 4?
strange



  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 5,939
Default range to cell

Sorry should be D3 not D4...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

=sheets("Sheet1").range("D4")
or
=sheets("Sheet1").cells(3, 4)
--
HTH...

Jim Thomlinson


"greg" wrote:

Hello,
I am writing a program.
I have a excel range object.
And I want to point another cell at this range.
how can I do that?
On the range there is column = 4 row = 3.
but I cannot just say
=4,3
or something like that?
don't you need
=D3?
why is the column D and not 4?
strange



  #4   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 59
Default range to cell

thanks jim.

however i am still a bit confused.
lets say i want to not assign the value. but reference the cell.
so if i am in cell A1 or 11
if I do this
Excel.ActiveCell = Excel.ActiveSheet.Cells(1, 2)
it will just asign the value of the cell
and this
Excel.ActiveCell = "=" & Excel.ActiveSheet.Cells(1, 2)
will be "=<value of cell"

is there a way to just reference the cell?

thanks






"Jim Thomlinson" wrote in message
...
Sorry should be D3 not D4...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

=sheets("Sheet1").range("D4")
or
=sheets("Sheet1").cells(3, 4)
--
HTH...

Jim Thomlinson


"greg" wrote:

Hello,
I am writing a program.
I have a excel range object.
And I want to point another cell at this range.
how can I do that?
On the range there is column = 4 row = 3.
but I cannot just say
=4,3
or something like that?
don't you need
=D3?
why is the column D and not 4?
strange





  #5   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 5,939
Default range to cell

So if I follow you (which I am not too sure that I do) you want one cell to
reference the other cell such that when you change the cell the referenced
cell is also changed??? If so you probably want to use the change event to
catch changes to the first cell and then replicate those changes to the other
cell.
--
HTH...

Jim Thomlinson


"greg" wrote:

thanks jim.

however i am still a bit confused.
lets say i want to not assign the value. but reference the cell.
so if i am in cell A1 or 11
if I do this
Excel.ActiveCell = Excel.ActiveSheet.Cells(1, 2)
it will just asign the value of the cell
and this
Excel.ActiveCell = "=" & Excel.ActiveSheet.Cells(1, 2)
will be "=<value of cell"

is there a way to just reference the cell?

thanks






"Jim Thomlinson" wrote in message
...
Sorry should be D3 not D4...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

=sheets("Sheet1").range("D4")
or
=sheets("Sheet1").cells(3, 4)
--
HTH...

Jim Thomlinson


"greg" wrote:

Hello,
I am writing a program.
I have a excel range object.
And I want to point another cell at this range.
how can I do that?
On the range there is column = 4 row = 3.
but I cannot just say
=4,3
or something like that?
don't you need
=D3?
why is the column D and not 4?
strange








  #6   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 59
Default range to cell

thanks for the help.
Not exactly.

For example, I would Like to have cell A1 = B1
But I only have a excel range object.
So in the range object I have column 2, row 1
so in my current cell, how can i reference this?
instead of saying =B1?
because i have column 2?
is there an easy way around this?

thanks for any help



"Jim Thomlinson" wrote in message
...
So if I follow you (which I am not too sure that I do) you want one cell

to
reference the other cell such that when you change the cell the referenced
cell is also changed??? If so you probably want to use the change event to
catch changes to the first cell and then replicate those changes to the

other
cell.
--
HTH...

Jim Thomlinson


"greg" wrote:

thanks jim.

however i am still a bit confused.
lets say i want to not assign the value. but reference the cell.
so if i am in cell A1 or 11
if I do this
Excel.ActiveCell = Excel.ActiveSheet.Cells(1, 2)
it will just asign the value of the cell
and this
Excel.ActiveCell = "=" & Excel.ActiveSheet.Cells(1, 2)
will be "=<value of cell"

is there a way to just reference the cell?

thanks






"Jim Thomlinson" wrote in

message
...
Sorry should be D3 not D4...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

=sheets("Sheet1").range("D4")
or
=sheets("Sheet1").cells(3, 4)
--
HTH...

Jim Thomlinson


"greg" wrote:

Hello,
I am writing a program.
I have a excel range object.
And I want to point another cell at this range.
how can I do that?
On the range there is column = 4 row = 3.
but I cannot just say
=4,3
or something like that?
don't you need
=D3?
why is the column D and not 4?
strange








  #7   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 527
Default range to cell

Greg

Sub getnextCol()
For Each c In Selection
c.Value = c.Offset(0, 1)
Next
End Sub

select the column and run - it copies the the values in the next column so
as you say, A1 = B1

Hope this helps

Peter

"greg" wrote:

thanks for the help.
Not exactly.

For example, I would Like to have cell A1 = B1
But I only have a excel range object.
So in the range object I have column 2, row 1
so in my current cell, how can i reference this?
instead of saying =B1?
because i have column 2?
is there an easy way around this?

thanks for any help



"Jim Thomlinson" wrote in message
...
So if I follow you (which I am not too sure that I do) you want one cell

to
reference the other cell such that when you change the cell the referenced
cell is also changed??? If so you probably want to use the change event to
catch changes to the first cell and then replicate those changes to the

other
cell.
--
HTH...

Jim Thomlinson


"greg" wrote:

thanks jim.

however i am still a bit confused.
lets say i want to not assign the value. but reference the cell.
so if i am in cell A1 or 11
if I do this
Excel.ActiveCell = Excel.ActiveSheet.Cells(1, 2)
it will just asign the value of the cell
and this
Excel.ActiveCell = "=" & Excel.ActiveSheet.Cells(1, 2)
will be "=<value of cell"

is there a way to just reference the cell?

thanks






"Jim Thomlinson" wrote in

message
...
Sorry should be D3 not D4...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

=sheets("Sheet1").range("D4")
or
=sheets("Sheet1").cells(3, 4)
--
HTH...

Jim Thomlinson


"greg" wrote:

Hello,
I am writing a program.
I have a excel range object.
And I want to point another cell at this range.
how can I do that?
On the range there is column = 4 row = 3.
but I cannot just say
=4,3
or something like that?
don't you need
=D3?
why is the column D and not 4?
strange









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
RANGE EXCEL copy cell that meets criteria in a range confused Excel Worksheet Functions 3 March 27th 08 01:41 PM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Change cell colour for a cell or range within a predefined range Martin[_21_] Excel Programming 2 May 23rd 05 06:16 PM
Range.Find returns cell outside of range when range set to single cell Frank Jones Excel Programming 12 June 10th 04 04:22 AM


All times are GMT +1. The time now is 01:36 AM.

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"