Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JRD JRD is offline
external usenet poster
 
Posts: 60
Default Using the numeric contents of a cell to define row number

Can anyone tell me whether I can put a number in a cell and then use that
cell to define a range

e.g.

A B
1 3 CABG
2 PCI
3 CABG
4 PCI

=countif(B1:B(A1), "PCI")

The answer should equal 1

Thanks

John

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Using the numeric contents of a cell to define row number

Try it like this:

=countif(indirect("B1:B"&A1), "PCI")

Hope this helps.

Pete

On Dec 5, 8:38 pm, JRD wrote:
Can anyone tell me whether I can put a number in a cell and then use that
cell to define a range

e.g.

A B
1 3 CABG
2 PCI
3 CABG
4 PCI

=countif(B1:B(A1), "PCI")

The answer should equal 1

Thanks

John


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Using the numeric contents of a cell to define row number

Hi John,

=COUNTIF(B1:INDIRECT("B"&A1),"PCI")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"JRD" wrote in message ...
| Can anyone tell me whether I can put a number in a cell and then use that
| cell to define a range
|
| e.g.
|
| A B
| 1 3 CABG
| 2 PCI
| 3 CABG
| 4 PCI
|
| =countif(B1:B(A1), "PCI")
|
| The answer should equal 1
|
| Thanks
|
| John
|


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Using the numeric contents of a cell to define row number

=COUNTIF(B1:INDEX(B:B,A1),"PCI")


"JRD" wrote:

Can anyone tell me whether I can put a number in a cell and then use that
cell to define a range

e.g.

A B
1 3 CABG
2 PCI
3 CABG
4 PCI

=countif(B1:B(A1), "PCI")

The answer should equal 1

Thanks

John

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JRD JRD is offline
external usenet poster
 
Posts: 60
Default Using the numeric contents of a cell to define row number

Can I use this formula with sumproduct?

John

"Teethless mama" wrote:

=COUNTIF(B1:INDEX(B:B,A1),"PCI")


"JRD" wrote:

Can anyone tell me whether I can put a number in a cell and then use that
cell to define a range

e.g.

A B
1 3 CABG
2 PCI
3 CABG
4 PCI

=countif(B1:B(A1), "PCI")

The answer should equal 1

Thanks

John

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
Subject: How to Reverse Contents in an Excel cell (NUMERIC VALUE) 3kings Excel Worksheet Functions 5 September 14th 07 01:02 AM
Subject: How to Reverse Contents in an Excel cell (NUMERIC VALUE) 3kings Excel Worksheet Functions 1 September 13th 07 06:45 PM
Subject: How to Reverse Contents in an Excel cell (NUMERIC VALUE) 3kings Excel Worksheet Functions 0 September 13th 07 05:26 PM
convert a numeric number in text format in another cell? Abhishek Excel Worksheet Functions 2 February 22nd 07 05:44 PM
How do I get a number or letter to represent cell contents? Formula help Excel Discussion (Misc queries) 2 February 25th 06 11:51 PM


All times are GMT +1. The time now is 03:24 AM.

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

About Us

"It's about Microsoft Excel"