Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested String Filename Variable ed9213 Excel Worksheet Functions 9 February 12th 07 02:27 AM
Variable in a filename reference in Excel 2000 pdabill Excel Discussion (Misc queries) 1 August 24th 06 11:08 PM
Put Filename Variable in Macro David Excel Discussion (Misc queries) 4 December 27th 05 06:27 PM
Multiple If's, one variable. And filename as cell contents hugh jass Excel Programming 0 September 10th 03 07:18 PM
Variable Filename/Worksheet/Workbook bw Excel Programming 2 July 19th 03 07:41 PM


All times are GMT +1. The time now is 02:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"