Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Writing Macros | Excel Discussion (Misc queries) | |||
Writing to csv | Excel Discussion (Misc queries) | |||
Writing a Marco | Excel Worksheet Functions | |||
writing a statement | Excel Worksheet Functions | |||
Writing a Marco | Excel Discussion (Misc queries) |