SPREAD SHEET FORMULA

A

AINS

I HAVE A SPREAD SHEET THAT I CANNT SORT WITHOUT MESSING UP THE FORMULAS THE
LAY OUT IS AT FOLLOWS

A B C
D
STATE ODOMETER START ODOMETER STOP MILES
PA
OH
NJ
CT
NH


I NEED A FORMULA TO ADD EACH STATES MILES AND OF COURSE THEY ARE NOT IN
ORDER, I NEED MY FORMULA TO RECOGNIZE THE STATE AND ONLY ADD THOSE MILES
TOGETHER??? HELP
 
R

Rick Rothstein

If you understand your question correctly, this formula should give you the
totals you want...

=SUMPRODUCT((A2:A1000="NJ")*D2:D1000)

Just change the "NJ" to the state you want and change the range to cover the
maximum number of rows you think you will need (make sure the A range and
the D range are the same size).
 
D

Don Guillett

Have a look in the help index for SUMIF. And, please quit SHOUTING. (typing
in all caps is considered to be RUDE)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top