counting cells and using a variable filename?!?!

  • Thread starter Thread starter solo_razor
  • Start date Start date
S

solo_razor

hello,

I have a problem with counting cells. I want to count all cell that
have the same value in a particularly cell and then count the rows and
put that number in a different cell (how many rows where count). Also i
want to acces a variable filename e.g.
remind = InputBox("what is the reminder date?")
...
....
Filename:="c:\dummydir\reminder\reminder-" & remind & ".xls"
.....
.......
...
windows(.......).activate
this does not work: windows("reminder-" & remind & ".xls").activate

hope someone can help

Thx
 
use the countif function, either in the worksheet, or in VBA.

you code should work if you construct a valid filename that matches an
existing file and that is open in Excel. If you get a subscript out of
range error, then you haven't matched the name of an open workbook.
 
Back
Top