Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Suming in multiple spreadsheets

I have a Workbook with 6 spreadsheets. The first column in each spreadsheet
has the capitol letter 'D' in certain cells. I need to know how many times a
'D' appears in the first column of each spreadsheet. This total will be on
the last spreadsheet only.

I know this is elementary but I do not know much about VBA.
Many Thanks to anyone who will help!
--
Robert Hill

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Suming in multiple spreadsheets

For Each sh In Activeworkbook.Worksheets
Msgbox sh.name & ", " & Application.Countif(sh.Range("A:A"),"D")
Next sh

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Robert" wrote in message
...
I have a Workbook with 6 spreadsheets. The first column in each

spreadsheet
has the capitol letter 'D' in certain cells. I need to know how many

times a
'D' appears in the first column of each spreadsheet. This total will be

on
the last spreadsheet only.

I know this is elementary but I do not know much about VBA.
Many Thanks to anyone who will help!
--
Robert Hill



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Suming in multiple spreadsheets

=countif(sheet1!A:A,"D")+countif(Sheet2!A:A,"D")+ and so forth

but countif is case insensitive. If there won't be any lowercase "d", then
perhaps this will work.

if not, you can use

=SUMPRODUCT(--EXACT(Sheet1!A1:A11,"D"))+SUMPRODUCT(--EXACT(Sheet2!A1:A11,"D"))+ and so forth

In this case, you can not refer to an entire column (and the fewer rows you
include, the faster it will recalculate).

--
Regards,
Tom Ogilvy






"Robert" wrote:

I have a Workbook with 6 spreadsheets. The first column in each spreadsheet
has the capitol letter 'D' in certain cells. I need to know how many times a
'D' appears in the first column of each spreadsheet. This total will be on
the last spreadsheet only.

I know this is elementary but I do not know much about VBA.
Many Thanks to anyone who will help!
--
Robert Hill

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Suming in multiple spreadsheets

Thanks...That is exactly what I needed.
--
Robert Hill



"Tom Ogilvy" wrote:

=countif(sheet1!A:A,"D")+countif(Sheet2!A:A,"D")+ and so forth

but countif is case insensitive. If there won't be any lowercase "d", then
perhaps this will work.

if not, you can use

=SUMPRODUCT(--EXACT(Sheet1!A1:A11,"D"))+SUMPRODUCT(--EXACT(Sheet2!A1:A11,"D"))+ and so forth

In this case, you can not refer to an entire column (and the fewer rows you
include, the faster it will recalculate).

--
Regards,
Tom Ogilvy






"Robert" wrote:

I have a Workbook with 6 spreadsheets. The first column in each spreadsheet
has the capitol letter 'D' in certain cells. I need to know how many times a
'D' appears in the first column of each spreadsheet. This total will be on
the last spreadsheet only.

I know this is elementary but I do not know much about VBA.
Many Thanks to anyone who will help!
--
Robert Hill

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
Update multiple spreadsheets in multiple workbooks TAP Setting up and Configuration of Excel 1 October 5th 10 01:36 AM
suming multiple rates nba Excel Discussion (Misc queries) 7 August 29th 09 10:36 PM
Counting and Suming based on multiple criteria Kev270 Excel Worksheet Functions 1 October 12th 06 02:55 PM
Looking up multiple items and suming the values on their rows walkingmac Excel Discussion (Misc queries) 2 March 6th 06 01:49 PM
How to update multiple links in multiple spreadsheets followin mo. Andy Excel Worksheet Functions 0 January 20th 05 04:51 PM


All times are GMT +1. The time now is 11:53 PM.

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

About Us

"It's about Microsoft Excel"