counting cells and using a variable filename?!?!

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
 
T

Tom Ogilvy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top