Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Sub Total in worksheet or SUM IF function

On Jul 3, 8:53*pm, Tom Ogilvy
wrote:
mySum = Application.SUMIF(Range("D20:D249"), _
* Range("W16"), Range("B20:B249"))

--
Regards,
Tom Ogilvy



"Shazi" wrote:
Hi,


I have a worksheet having some fields like:


A1: * PartsID
B1: *PartName
C1: Qty
D1: UnitPrice
E1: TotalPrice
F1: Category * (can be Plumbing, Electrical, Laundry, Kitchen etc.)


and I have a data entry form, daily many entries can be done with
different category.


Can I have a VBA function to Calculate Sum OR Sub Total of all items
in H column by category.


If I Put type in


G column * * * * * * *H column
-------------- * * * * * *--------------------
Plumbing * * * * * * Total amount from all the list.
Electrical * * * * * * Total amount from all the list.
Laundry * * * * * * * Total amount from all the list.


I am using the below formula, in other excel file,
=SUMIF(D20:D249,W16,B20:B249)


but I need VBA procedure to this. if it possible pls send me the good
procedure. I will be highly appreciated.


with best regards.


Syed Shahzad Zafar
Madinah- Hide quoted text -


- Show quoted text -


Hi,

I tried your formula, but MySum is giving error.

saying: Variable not defined.....

how to fix.....

pls help me I am newbie.

Regards.

Shahzad
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
using an IF function for a total Drummy[_2_] Excel Programming 3 June 3rd 06 01:32 PM
using an IF function for a total Drummy Excel Discussion (Misc queries) 4 June 3rd 06 10:39 AM
Possible? If total in a worksheet 0, highlight worksheet tab? TKGerdie Excel Worksheet Functions 5 November 22nd 05 08:10 PM
Sum Total in a worksheet man-man Excel Programming 2 May 29th 04 07:23 PM
Get the total no. of worksheet & their name [email protected] Excel Programming 1 February 27th 04 09:48 AM


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