ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   subtract one cell from each cell in a range and count instances (https://www.excelbanter.com/excel-worksheet-functions/245573-subtract-one-cell-each-cell-range-count-instances.html)

tworrall

subtract one cell from each cell in a range and count instances
 
I want to subtract a singel cell value from a range of cells. For each cell
in the range I want to count the instances of when that cell minus the single
cell is greater than 30.

I am subtracting two date to get the number of days between the two. If that
is greater than 30 I want to count it. The first date is a single date. I
want to subtract that date from each date in a range. If the difference is
greater than 30, I count it. The result is the count of date differences that
are greater tan 30.

So I have a date in A2. I have a range of dates E:E. I want to count each
instance that A2-E:E30

Jacob Skaria

subtract one cell from each cell in a range and count instances
 
Try
=SUMPRODUCT((A2-E1:E10030)*(E1:E1000))

If this post helps click Yes
---------------
Jacob Skaria


"tworrall" wrote:

I want to subtract a singel cell value from a range of cells. For each cell
in the range I want to count the instances of when that cell minus the single
cell is greater than 30.

I am subtracting two date to get the number of days between the two. If that
is greater than 30 I want to count it. The first date is a single date. I
want to subtract that date from each date in a range. If the difference is
greater than 30, I count it. The result is the count of date differences that
are greater tan 30.

So I have a date in A2. I have a range of dates E:E. I want to count each
instance that A2-E:E30


Glenn

subtract one cell from each cell in a range and count instances
 
tworrall wrote:
I want to subtract a singel cell value from a range of cells. For each cell
in the range I want to count the instances of when that cell minus the single
cell is greater than 30.

I am subtracting two date to get the number of days between the two. If that
is greater than 30 I want to count it. The first date is a single date. I
want to subtract that date from each date in a range. If the difference is
greater than 30, I count it. The result is the count of date differences that
are greater tan 30.

So I have a date in A2. I have a range of dates E:E. I want to count each
instance that A2-E:E30



=COUNTIF(E:E,"<"&A2-30)


All times are GMT +1. The time now is 04:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com