formula to find a range of cells = to a value

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

I need to do calculations on multiple cells that are in multiple rows. The
rows that I need to work with will all have the same value in the first
column. The spreadsheet is already sorted by the first column, I just need
to know how many rows have the same value in the first column. Then I will
write a formula that will use that range for doing some basic math
calculations.

Thank you,

Gary
 
Hi,

Why don't you give us an example, some data and the calculation you are
trying to do.

You can find how many cells have a given value in column A with the formula

=COUNTIF(A:A,"myvalue")
 
Thank you for quick reply. I copied and pasted a simplified example. I need
to calculate the meter difference between like parts for the same sn. I also
need to calculate the meter difference between part '2' and '5'. For sn 'a',
the answers would be 140 and 50.
sn part Date meter countif difference in meter
a 2 01/01/08 10 5
a 2 02/01/08 150 5 140
a 5 03/01/08 200 5 50
a 6 04/01/08 300 5
a 1 05/01/08 400 5
b 2 07/01/08 225 2
b 1 08/01/08 250 2
c 1 09/01/08 25 1


This is difficult for me to explain in writing, hopefully it makes sense?

Thank you,

Gary
 
the countif formula does tell me how many cells, but I think I really want to
know the range. Like a2:a6. Then I could use this result in a vlookup.

Thank you,

Gary
 
Back
Top