View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Pointing directly to a cell in a range

Tom,

Yes, though you need to better explain your criteria for selecting a cell.

Perhaps?

MyCell.Offset(0, 3).Value = _
wkBk.Worksheets("All Data Unnarr").Range("B1:B500").Cells(Range("C-ACCOUNTS
Total").Value).Offset(0, 3).Value

where the value in a cell named "C-ACCOUNTS Total":

Range("C-ACCOUNTS Total").Value

is the indexing value that you want to use

HTH,
Bernie
MS Excel MVP


"Tomski" wrote in message
...

Hi guys,

Just a quick one, is it possible to point directly to the contents of a
cell that is in a range, although we done know where, without using a
loop to check each cell. For example (note sure which is more correct,
but you get the idea)

MyCell.Offset(0, 3) = wkBk.Worksheets("All Data
Unnarr").Range("B1:B500").Cells("C-ACCOUNTS Total").Offset(0, 3)

or

MyCell.Offset(0, 3) = wkBk.Worksheets("All Data
Unnarr").Range("B1:B500").Range("C-ACCOUNTS Total").Offset(0, 3)

Thanks,

Tom


--
Tomski
------------------------------------------------------------------------
Tomski's Profile: http://www.excelforum.com/member.php...o&userid=26824
View this thread: http://www.excelforum.com/showthread...hreadid=500720