Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default formula to find a range of cells = to a value

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default formula to find a range of cells = to a value

=COUNTIF(A:A,A1) might work for you
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Gary" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default formula to find a range of cells = to a value

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")

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Gary" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default formula to find a range of cells = to a value

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


"Shane Devenshire" wrote:

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")

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Gary" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default formula to find a range of cells = to a value

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

"Bernard Liengme" wrote:

=COUNTIF(A:A,A1) might work for you
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Gary" wrote in message
...
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




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
Find lowest total of cells in range without sorting bevinb Excel Worksheet Functions 5 December 22nd 08 02:31 AM
How to find text in a range of cells? r.e.s. Excel Discussion (Misc queries) 6 January 5th 07 03:59 PM
Find a range of values in a range of cells Jack Taylor Excel Worksheet Functions 20 November 25th 06 01:26 PM
Formula to find first, second, third etc. value (range) Cello Excel Discussion (Misc queries) 2 August 6th 05 07:57 AM
find a cells from a range of cell kelvintaycc Excel Worksheet Functions 2 April 2nd 05 07:20 PM


All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"