Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default data summary & macros

Hi

once again my needs are outstripped by my abilities so I turn here for help

I produce weight reports from my scales for cattle weighed by type and number

Each weighing event is made up of multiple weighings specifying type, number
and weight.

This is exported in excel format as below.

I need the formula to present a summary at base that does the following
Look at animal types listed and dop the "names" into the summary area, and
then sum the total number oif animals for that type plus there weight into
cells along side


A B C
Cow 22 10000
Cow 5 3200
Steer 3 1780
Bull 1 450
Steer 17 5600
Cow 2 890

The summary needs to pull the animal types as above with toatls per type.

BNext time I weigh the animal types may well be different.

Once I have formulas correct I wll record macro to fast track

Hopefully this q makes sense

anthony



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default data summary & macros

Do you mean the totals for each type...

In Col D if you have the animal types

cow
bull

In Col E use the below formula
=SUMIF(A:A,D1,B:B)
and in Col F use the below formula
=SUMIF(A:A,D1,C:C)


--
If this post helps click Yes
---------------
Jacob Skaria


"Anthony" wrote:

Hi

once again my needs are outstripped by my abilities so I turn here for help

I produce weight reports from my scales for cattle weighed by type and number

Each weighing event is made up of multiple weighings specifying type, number
and weight.

This is exported in excel format as below.

I need the formula to present a summary at base that does the following
Look at animal types listed and dop the "names" into the summary area, and
then sum the total number oif animals for that type plus there weight into
cells along side


A B C
Cow 22 10000
Cow 5 3200
Steer 3 1780
Bull 1 450
Steer 17 5600
Cow 2 890

The summary needs to pull the animal types as above with toatls per type.

BNext time I weigh the animal types may well be different.

Once I have formulas correct I wll record macro to fast track

Hopefully this q makes sense

anthony



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default data summary & macros

Dear Steve

Mention the 20 shape names as a comma separated string...like below and run
the below macro.... Make sure the names are exactly same as the shape
names....For example the by default name for Rectangle come as 'Rectangle 1'
and not 'Rectangle1'...Try and feedback


Sub Macro()
Dim lngTemp As Variant
Dim strShapes As String

strShapes = "Rectagle 10,Rectangle 2,Rectangle 31"
strShapes = strShapes & ",Rectagle 32,Rectangle 35,Rectangle 70"


For lngTemp = 1 To ActiveSheet.Shapes.Count
If InStr(1, "," & strShapes & ",", "," & ActiveSheet. _
Shapes(lngTemp).Name & ",", vbTextCompare) = 0 Then
ActiveSheet.Shapes(lngTemp).Delete
End If
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Anthony" wrote:

Hi

once again my needs are outstripped by my abilities so I turn here for help

I produce weight reports from my scales for cattle weighed by type and number

Each weighing event is made up of multiple weighings specifying type, number
and weight.

This is exported in excel format as below.

I need the formula to present a summary at base that does the following
Look at animal types listed and dop the "names" into the summary area, and
then sum the total number oif animals for that type plus there weight into
cells along side


A B C
Cow 22 10000
Cow 5 3200
Steer 3 1780
Bull 1 450
Steer 17 5600
Cow 2 890

The summary needs to pull the animal types as above with toatls per type.

BNext time I weigh the animal types may well be different.

Once I have formulas correct I wll record macro to fast track

Hopefully this q makes sense

anthony



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default data summary & macros

Oops...Please ignore the below post.....
--
If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Dear Steve

Mention the 20 shape names as a comma separated string...like below and run
the below macro.... Make sure the names are exactly same as the shape
names....For example the by default name for Rectangle come as 'Rectangle 1'
and not 'Rectangle1'...Try and feedback


Sub Macro()
Dim lngTemp As Variant
Dim strShapes As String

strShapes = "Rectagle 10,Rectangle 2,Rectangle 31"
strShapes = strShapes & ",Rectagle 32,Rectangle 35,Rectangle 70"


For lngTemp = 1 To ActiveSheet.Shapes.Count
If InStr(1, "," & strShapes & ",", "," & ActiveSheet. _
Shapes(lngTemp).Name & ",", vbTextCompare) = 0 Then
ActiveSheet.Shapes(lngTemp).Delete
End If
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Anthony" wrote:

Hi

once again my needs are outstripped by my abilities so I turn here for help

I produce weight reports from my scales for cattle weighed by type and number

Each weighing event is made up of multiple weighings specifying type, number
and weight.

This is exported in excel format as below.

I need the formula to present a summary at base that does the following
Look at animal types listed and dop the "names" into the summary area, and
then sum the total number oif animals for that type plus there weight into
cells along side


A B C
Cow 22 10000
Cow 5 3200
Steer 3 1780
Bull 1 450
Steer 17 5600
Cow 2 890

The summary needs to pull the animal types as above with toatls per type.

BNext time I weigh the animal types may well be different.

Once I have formulas correct I wll record macro to fast track

Hopefully this q makes sense

anthony



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default data summary & macros

a pivot table will do this for you

"Anthony" wrote in message
...
Hi

once again my needs are outstripped by my abilities so I turn here for
help

I produce weight reports from my scales for cattle weighed by type and
number

Each weighing event is made up of multiple weighings specifying type,
number
and weight.

This is exported in excel format as below.

I need the formula to present a summary at base that does the following
Look at animal types listed and dop the "names" into the summary area, and
then sum the total number oif animals for that type plus there weight into
cells along side


A B C
Cow 22 10000
Cow 5 3200
Steer 3 1780
Bull 1 450
Steer 17 5600
Cow 2 890

The summary needs to pull the animal types as above with toatls per type.

BNext time I weigh the animal types may well be different.

Once I have formulas correct I wll record macro to fast track

Hopefully this q makes sense

anthony



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
DATA SUMMARY M.GONZALEZ[_2_] Excel Worksheet Functions 1 May 28th 09 05:41 PM
Data summary Parish Pete Excel Discussion (Misc queries) 4 January 26th 09 07:23 PM
Copy two summary ranges to master summary sheet a m spock Excel Programming 5 September 13th 08 01:49 PM
Getting Summary Data From A large Data of Files in a Directory stratis Excel Programming 3 July 2nd 07 02:08 PM
Use detailed data in one worksheet to create summary data as chart source rdemyan Charts and Charting in Excel 0 January 23rd 07 02:18 PM


All times are GMT +1. The time now is 05:46 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"