Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Looking for numbers in page range

I need a formula to find numbers in a column that are exactly within a
range, like a page range.

Example desired result:
Column A
7
10
100

Chapter 1 pp. 7-8: YES
Chapter 2 pp. 9-12: YES
Chapter 3 pp. 13-25: NO
Chapter 4 pp. 26-100: YES

As it is, I keep getting a YES for Chapter 3, with this formula:

=IF(AND(IF(COUNTIF(A1:A3,
"=13")0,TRUE,FALSE),IF(COUNTIF(A1:A3,"<=25")0,T RUE,FALSE))=TRUE,C1&",
","")

That's because the formula is finding that there is a number =13
(100) and a number that is <=25 (10), yet none of these numbers is in
the page range of 13-25.

What function do I use to do this correctly?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,073
Default Looking for numbers in page range

On Feb 3, 8:53 am, wrote:
I need a formula to find numbers in a column that are exactly within a
range, like a page range.

Example desired result:
Column A
7
10
100

Chapter 1 pp. 7-8: YES
Chapter 2 pp. 9-12: YES
Chapter 3 pp. 13-25: NO
Chapter 4 pp. 26-100: YES

As it is, I keep getting a YES for Chapter 3, with this formula:

=IF(AND(IF(COUNTIF(A1:A3,
"=13")0,TRUE,FALSE),IF(COUNTIF(A1:A3,"<=25")0,T RUE,FALSE))=TRUE,C1&",
","")

That's because the formula is finding that there is a number =13
(100) and a number that is <=25 (10), yet none of these numbers is in
the page range of 13-25.

What function do I use to do this correctly?


Hi Alfred,

I'm not sure about the latter part of your formula, however if you are
after a NO when none of the page numbers in column A are included in
pp 13-25 and a YES when one or more of the column A numbers are
included are included in pp 13-25 then use...

=IF(COUNTIF(A:A,"=13")-COUNTIF(A:A,"25")0,"YES","NO")

Ken Johnson

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Looking for numbers in page range

As far as I can tell, this is what I needed! Thanks!

On Feb 2, 5:31 pm, "Ken Johnson" wrote:
On Feb 3, 8:53 am, wrote:



I need a formula to find numbers in a column that are exactly within a
range, like a page range.


Example desired result:
Column A
7
10
100


Chapter 1 pp. 7-8: YES
Chapter 2 pp. 9-12: YES
Chapter 3 pp. 13-25: NO
Chapter 4 pp. 26-100: YES


As it is, I keep getting a YES for Chapter 3, with this formula:


=IF(AND(IF(COUNTIF(A1:A3,
"=13")0,TRUE,FALSE),IF(COUNTIF(A1:A3,"<=25")0,T RUE,FALSE))=TRUE,C1&",
","")


That's because the formula is finding that there is a number =13
(100) and a number that is <=25 (10), yet none of these numbers is in
the page range of 13-25.


What function do I use to do this correctly?


Hi Alfred,

I'm not sure about the latter part of your formula, however if you are
after a NO when none of the page numbers in column A are included in
pp 13-25 and a YES when one or more of the column A numbers are
included are included in pp 13-25 then use...

=IF(COUNTIF(A:A,"=13")-COUNTIF(A:A,"25")0,"YES","NO")

Ken Johnson





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,073
Default Looking for numbers in page range

Hi Alfred,

You're welcome.
Thanks for the feedback and the great rating.
JMB's solution is a better one since it only uses one function call.
Thanks to JMB.

Ken Johnson

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Looking for numbers in page range

where B1 = 13 and C1 = 25

=IF(SUMPRODUCT(--($A$1:$A$3=B1),--($A$1:$A$3<=C1)), "YES", "NO")

modify ranges as needed.


" wrote:

I need a formula to find numbers in a column that are exactly within a
range, like a page range.

Example desired result:
Column A
7
10
100

Chapter 1 pp. 7-8: YES
Chapter 2 pp. 9-12: YES
Chapter 3 pp. 13-25: NO
Chapter 4 pp. 26-100: YES

As it is, I keep getting a YES for Chapter 3, with this formula:

=IF(AND(IF(COUNTIF(A1:A3,
"=13")0,TRUE,FALSE),IF(COUNTIF(A1:A3,"<=25")0,T RUE,FALSE))=TRUE,C1&",
","")

That's because the formula is finding that there is a number =13
(100) and a number that is <=25 (10), yet none of these numbers is in
the page range of 13-25.

What function do I use to do this correctly?




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
Confused about range names Busy John Excel Discussion (Misc queries) 3 February 1st 07 10:24 PM
Big background page numbers/ Can't change format of a range Micky01 New Users to Excel 2 April 23rd 06 09:28 PM
Page scaling & Page break preview prob Martin ©¿©¬ @REMOVETHIS.plus.com Excel Discussion (Misc queries) 1 July 17th 05 09:10 PM
Excel Page Range Printing Problems SkyEyes Excel Discussion (Misc queries) 2 July 11th 05 08:18 PM
adding a new page break to an existing page break Edward Letendre Excel Discussion (Misc queries) 1 March 6th 05 09:29 AM


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