View Single Post
  #7   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,

Which workbook is the range "C-ACCOUNTS" in?

What is the value in "C-ACCOUNTS"? Is it numeric, or is it a string?

What is your criteria for selecting a cell from the range Range("A4:O4")? Matching the value of
"C-ACCOUNTS"?

HTH,
Bernie
MS Excel MVP


"Tomski" wrote in message
...

Sorry its taken so long to reply, excel is one of many things I do at
work, so it takes me a while to address things.

That doesn't work either, but I am tring to access an inactive
workbook. Here is the basis of my code which should give you a better
idea.

Its a sub routine that takes copies data from a work book on to a work
sheet.


Sub teamData(wkBk As Workbook, wkSt As Worksheet, team As String, datee
As Date)

wkSt.Activate

For Each MyCell In Range("A1:A400").Cells
If MyCell = datee Then

MyCell.Offset(0, 3).Value = wkBk.Worksheets("All Data
Unnarr").Range("A4:O4").Cells(Range("C-ACCOUNTS").Value).Offset(0,
3).Value



End If
Next MyCell

End Sub


Cheers,

Tom


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