Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum data in workbook 1 and write result in workbook 2

Hi,

I need some help with excel macro!
I have two workbooks. Now I need to sum all cells with some date criteria
from first workook
and result must be inserted in cell in second workbook (for example in cell
A1)

WorkBook1 data example

Column B (dates) Column C (payroll)
12.05.2005 1200
12.05.2005 5000
14.05.2005 3100
14.05.2005 8800
17.05.2005 3550
....


For example: sum all values in column C where date in column B is 12.05.2005
and put result in workbook 2 in cell A1

Thanks for help.


  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Sum data in workbook 1 and write result in workbook 2

Martin

You don't need a macro, just a formula. If the data is in book1.xls and you
want the answer in book2.xls, the formula would be something like.

=SUMIF([Book1]Sheet1!$A$1:$A$11,[Book1]Sheet1!$A$1,[Book1]Sheet1!$B$1:$B$11)

To work this, enter the =SUMIF(

in book2 and then select the dates in book1, type a comma and then select
the date you are using as the criteria or type it in "". then enter a comma
and select the data you are wanting to sum

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"Martin" wrote in message
...
Hi,

I need some help with excel macro!
I have two workbooks. Now I need to sum all cells with some date criteria
from first workook
and result must be inserted in cell in second workbook (for example in
cell A1)

WorkBook1 data example

Column B (dates) Column C (payroll)
12.05.2005 1200
12.05.2005 5000
14.05.2005 3100
14.05.2005 8800
17.05.2005 3550
...


For example: sum all values in column C where date in column B is
12.05.2005 and put result in workbook 2 in cell A1

Thanks for help.



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
select data and write results to new worksheet in same workbook CCJ Excel Discussion (Misc queries) 2 March 26th 09 10:32 PM
HELP: Use the autofilter result on one workbook to filter the next list on another workbook Kathy Houtami Excel Worksheet Functions 6 September 11th 07 05:29 AM
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook burl_rfc Excel Programming 1 April 1st 06 08:48 PM
Write no closed workbook ? MAS Excel Programming 2 July 31st 04 04:39 PM
Open a password protected excel workbook from second workbook to fetch data using dynamic connection kaustav choudhury Excel Programming 2 April 3rd 04 06:18 AM


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

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"