Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Help Writing Function

I have a list of dollar values listed in column A. I have assign a category
in column B to each of them. I want to add them by category.

So for an example:

A1 = 10.00 B1= Rent
A2 = 25.00 B2= Gas
A3 = 5.00 B3 = Rent
A4 = 100.00 B4= Gas

Now I want to say - Add Rent and give me the total in C12.
Add Gas and give me the total in C13.

Please help

Thanks



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Help Writing Function

hi
sumif should work for you
=SUMIF(B1:B4,"gas",A1:A4)
you will need a sumif formula for each catagory.

regards
FSt1

"JamesEXCELhelp" wrote:

I have a list of dollar values listed in column A. I have assign a category
in column B to each of them. I want to add them by category.

So for an example:

A1 = 10.00 B1= Rent
A2 = 25.00 B2= Gas
A3 = 5.00 B3 = Rent
A4 = 100.00 B4= Gas

Now I want to say - Add Rent and give me the total in C12.
Add Gas and give me the total in C13.

Please help

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help Writing Function

Try it like this:

=SUMIF(B1:B4,"Rent",A1:A4)
=SUMIF(B1:B4,"Gas",A1:A4)

Or, suppose you have in B12:B13 - Rent, Gas

Then, in C12:

=SUMIF(B$1:B$4,B12,A$1:A$4)

Copy down to C13


--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in message
...
I have a list of dollar values listed in column A. I have assign a category
in column B to each of them. I want to add them by category.

So for an example:

A1 = 10.00 B1= Rent
A2 = 25.00 B2= Gas
A3 = 5.00 B3 = Rent
A4 = 100.00 B4= Gas

Now I want to say - Add Rent and give me the total in C12.
Add Gas and give me the total in C13.

Please help

Thanks





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Help Writing Function

Thanks this worked perfect

"T. Valko" wrote:

Try it like this:

=SUMIF(B1:B4,"Rent",A1:A4)
=SUMIF(B1:B4,"Gas",A1:A4)

Or, suppose you have in B12:B13 - Rent, Gas

Then, in C12:

=SUMIF(B$1:B$4,B12,A$1:A$4)

Copy down to C13


--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in message
...
I have a list of dollar values listed in column A. I have assign a category
in column B to each of them. I want to add them by category.

So for an example:

A1 = 10.00 B1= Rent
A2 = 25.00 B2= Gas
A3 = 5.00 B3 = Rent
A4 = 100.00 B4= Gas

Now I want to say - Add Rent and give me the total in C12.
Add Gas and give me the total in C13.

Please help

Thanks






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Help Writing Function

Thanks this worked perfect

"FSt1" wrote:

hi
sumif should work for you
=SUMIF(B1:B4,"gas",A1:A4)
you will need a sumif formula for each catagory.

regards
FSt1

"JamesEXCELhelp" wrote:

I have a list of dollar values listed in column A. I have assign a category
in column B to each of them. I want to add them by category.

So for an example:

A1 = 10.00 B1= Rent
A2 = 25.00 B2= Gas
A3 = 5.00 B3 = Rent
A4 = 100.00 B4= Gas

Now I want to say - Add Rent and give me the total in C12.
Add Gas and give me the total in C13.

Please help

Thanks





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Help Writing Function

One more Question!

If I have created multi-tabs in my excel spreadsheet. For example:

tab for 01-03, then the next tab for 01-04, and so fourth.

Now I have implemented =SUMIF('01-03'!E:E,"Food/Gas",'01-03'!C:C)

Checking the entire column E for Food/Gas and addind Values in column C.

Now I want to modify the equation for each tab.

Can I do something like
=SUMIF('01-03:01-31'!E:E,"Food/Gas",'01-03:01-31'!C:C)?

I could not get this to work?

Thanks Again

"T. Valko" wrote:

Try it like this:

=SUMIF(B1:B4,"Rent",A1:A4)
=SUMIF(B1:B4,"Gas",A1:A4)

Or, suppose you have in B12:B13 - Rent, Gas

Then, in C12:

=SUMIF(B$1:B$4,B12,A$1:A$4)

Copy down to C13


--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in message
...
I have a list of dollar values listed in column A. I have assign a category
in column B to each of them. I want to add them by category.

So for an example:

A1 = 10.00 B1= Rent
A2 = 25.00 B2= Gas
A3 = 5.00 B3 = Rent
A4 = 100.00 B4= Gas

Now I want to say - Add Rent and give me the total in C12.
Add Gas and give me the total in C13.

Please help

Thanks






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help Writing Function

Can I do something like
=SUMIF('01-03:01-31'!E:E,"Food/Gas",'01-03:01-31'!C:C)?


Unfortunately, it becomes *much* more complicated.

Try this:

=SUMPRODUCT(SUMIF(INDIRECT("'01-"&TEXT(ROW(INDIRECT("3:31")),"00")&"'!E:E"),"f ood/gas",INDIRECT("'01-"&TEXT(ROW(INDIRECT("3:31")),"00")&"'!C:C")))

This will work on sheets 01-03 through 01-31

--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in message
...
One more Question!

If I have created multi-tabs in my excel spreadsheet. For example:

tab for 01-03, then the next tab for 01-04, and so fourth.

Now I have implemented =SUMIF('01-03'!E:E,"Food/Gas",'01-03'!C:C)

Checking the entire column E for Food/Gas and addind Values in column C.

Now I want to modify the equation for each tab.

Can I do something like
=SUMIF('01-03:01-31'!E:E,"Food/Gas",'01-03:01-31'!C:C)?

I could not get this to work?

Thanks Again

"T. Valko" wrote:

Try it like this:

=SUMIF(B1:B4,"Rent",A1:A4)
=SUMIF(B1:B4,"Gas",A1:A4)

Or, suppose you have in B12:B13 - Rent, Gas

Then, in C12:

=SUMIF(B$1:B$4,B12,A$1:A$4)

Copy down to C13


--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in
message
...
I have a list of dollar values listed in column A. I have assign a
category
in column B to each of them. I want to add them by category.

So for an example:

A1 = 10.00 B1= Rent
A2 = 25.00 B2= Gas
A3 = 5.00 B3 = Rent
A4 = 100.00 B4= Gas

Now I want to say - Add Rent and give me the total in C12.
Add Gas and give me the total in C13.

Please help

Thanks








  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Help Writing Function

WOW!

I have no idea why it works but it does!

Thank Again

"T. Valko" wrote:

Can I do something like
=SUMIF('01-03:01-31'!E:E,"Food/Gas",'01-03:01-31'!C:C)?


Unfortunately, it becomes *much* more complicated.

Try this:

=SUMPRODUCT(SUMIF(INDIRECT("'01-"&TEXT(ROW(INDIRECT("3:31")),"00")&"'!E:E"),"f ood/gas",INDIRECT("'01-"&TEXT(ROW(INDIRECT("3:31")),"00")&"'!C:C")))

This will work on sheets 01-03 through 01-31

--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in message
...
One more Question!

If I have created multi-tabs in my excel spreadsheet. For example:

tab for 01-03, then the next tab for 01-04, and so fourth.

Now I have implemented =SUMIF('01-03'!E:E,"Food/Gas",'01-03'!C:C)

Checking the entire column E for Food/Gas and addind Values in column C.

Now I want to modify the equation for each tab.

Can I do something like
=SUMIF('01-03:01-31'!E:E,"Food/Gas",'01-03:01-31'!C:C)?

I could not get this to work?

Thanks Again

"T. Valko" wrote:

Try it like this:

=SUMIF(B1:B4,"Rent",A1:A4)
=SUMIF(B1:B4,"Gas",A1:A4)

Or, suppose you have in B12:B13 - Rent, Gas

Then, in C12:

=SUMIF(B$1:B$4,B12,A$1:A$4)

Copy down to C13


--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in
message
...
I have a list of dollar values listed in column A. I have assign a
category
in column B to each of them. I want to add them by category.

So for an example:

A1 = 10.00 B1= Rent
A2 = 25.00 B2= Gas
A3 = 5.00 B3 = Rent
A4 = 100.00 B4= Gas

Now I want to say - Add Rent and give me the total in C12.
Add Gas and give me the total in C13.

Please help

Thanks









  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help Writing Function

You're welcome. Thanks for the feedback!


--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in message
...
WOW!

I have no idea why it works but it does!

Thank Again

"T. Valko" wrote:

Can I do something like
=SUMIF('01-03:01-31'!E:E,"Food/Gas",'01-03:01-31'!C:C)?


Unfortunately, it becomes *much* more complicated.

Try this:

=SUMPRODUCT(SUMIF(INDIRECT("'01-"&TEXT(ROW(INDIRECT("3:31")),"00")&"'!E:E"),"f ood/gas",INDIRECT("'01-"&TEXT(ROW(INDIRECT("3:31")),"00")&"'!C:C")))

This will work on sheets 01-03 through 01-31

--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in
message
...
One more Question!

If I have created multi-tabs in my excel spreadsheet. For example:

tab for 01-03, then the next tab for 01-04, and so fourth.

Now I have implemented =SUMIF('01-03'!E:E,"Food/Gas",'01-03'!C:C)

Checking the entire column E for Food/Gas and addind Values in column
C.

Now I want to modify the equation for each tab.

Can I do something like
=SUMIF('01-03:01-31'!E:E,"Food/Gas",'01-03:01-31'!C:C)?

I could not get this to work?

Thanks Again

"T. Valko" wrote:

Try it like this:

=SUMIF(B1:B4,"Rent",A1:A4)
=SUMIF(B1:B4,"Gas",A1:A4)

Or, suppose you have in B12:B13 - Rent, Gas

Then, in C12:

=SUMIF(B$1:B$4,B12,A$1:A$4)

Copy down to C13


--
Biff
Microsoft Excel MVP


"JamesEXCELhelp" wrote in
message
...
I have a list of dollar values listed in column A. I have assign a
category
in column B to each of them. I want to add them by category.

So for an example:

A1 = 10.00 B1= Rent
A2 = 25.00 B2= Gas
A3 = 5.00 B3 = Rent
A4 = 100.00 B4= Gas

Now I want to say - Add Rent and give me the total in C12.
Add Gas and give me the total in C13.

Please help

Thanks











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
Writing Macros GRoger Excel Discussion (Misc queries) 2 October 25th 07 10:43 PM
Writing to csv Jeff Excel Discussion (Misc queries) 2 March 16th 07 01:35 PM
Writing a Marco Curtis Excel Worksheet Functions 1 October 30th 06 02:32 AM
writing a statement newexceluser Excel Worksheet Functions 1 July 21st 06 10:15 PM
Writing a Marco Joey Excel Discussion (Misc queries) 0 August 8th 05 08:10 PM


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

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"