Thread: Formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dan Gardner Dan Gardner is offline
external usenet poster
 
Posts: 11
Default Formula


in a vba macro the full path for referring to a cell is the following

workbooks("XXXXX").worksheets("XXXXX").cells(XX, XX).XXXXX
the path can be truncated if you track where your at. IE if you leave off
the workbooks portion it will refer to that worksheet and cell in the
currently active workbook, the same is true for worksheets. For example using
a conditional if statement with cells in different workbooks

if workbooks("Cool1").worksheets("Sheet1").cells(5, 8).value =
workbooks("Cool2").worksheets("Sheet1").cells(5, 8).value then

hope this helps