#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I

I have a list of states I travel in all month long (column A) and the miles I
travel listed in (column B) each time I go there.
I need to be able to pull the state and the mile for that state and get a
total for the month (for taxes) Does anyone know how??
Example:

A B
States Miles
GA 55
FL 50
KY 78
GA 78
AL 100
FL 99
AL 87

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 269
Default How do I

Sumproduct will work for each state

=Sumproduct(--(A1:A10="GA"),B1:B10)

the --(a1:a10="GA") when true =1 when false=0 so will only total values
meeting the criteria

You can subsititute a cell ref (ie =D1) and copy down as needed
--
If this helps, please remember to click yes.


"Jody S" wrote:

I have a list of states I travel in all month long (column A) and the miles I
travel listed in (column B) each time I go there.
I need to be able to pull the state and the mile for that state and get a
total for the month (for taxes) Does anyone know how??
Example:

A B
States Miles
GA 55
FL 50
KY 78
GA 78
AL 100
FL 99
AL 87

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default How do I

Hi,

You may use a SUMIF() function. =sumif(A2:A8,A10,B2:B8). A10 has the
particular state.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Jody S" wrote in message
...
I have a list of states I travel in all month long (column A) and the
miles I
travel listed in (column B) each time I go there.
I need to be able to pull the state and the mile for that state and get a
total for the month (for taxes) Does anyone know how??
Example:

A B
States Miles
GA 55
FL 50
KY 78
GA 78
AL 100
FL 99
AL 87

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



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