Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
counting cells and using a variable filename?!?!
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 ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
counting cells and using a variable filename?!?!
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. -- Regards, Tom Ogilvy "solo_razor" wrote in message ... 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 ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Nested String Filename Variable | Excel Worksheet Functions | |||
Variable in a filename reference in Excel 2000 | Excel Discussion (Misc queries) | |||
Put Filename Variable in Macro | Excel Discussion (Misc queries) | |||
Multiple If's, one variable. And filename as cell contents | Excel Programming | |||
Variable Filename/Worksheet/Workbook | Excel Programming |