cell range referencing from within a function

G

Guest

Guest
hi,

I have a cell which counts instances of a word in a range. The formula for that is:

=COUNTIF(D529:D541,$F$5)

F5 contains the word i'm counting

This works fine, giving me the number of times the word in F5 appears in the given range. However, I am adding new data to this constantly and I want to be able to copy this formula easily. Basically I want to put "D529:D541" in a cell, say L10, and then reference this cell somehow from the formula. (sort of like, =COUNTIF(ref.L10,$F$5).

Anyone know how I can do this fairly easily? I've looked at CELL("contents", L10), but it doesn't work when placed in the COUNTIF function (I think it doesn't return type range or something).

All help appreciated,

Lobo
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
odd, it logged me out while I was typing that..

here's my login if that's needed :p

Lobo
 
Upvote 0
On 2002-03-14 02:30, Anonymous wrote:
hi,

I have a cell which counts instances of a word in a range. The formula for that is:

=COUNTIF(D529:D541,$F$5)

F5 contains the word i'm counting

This works fine, giving me the number of times the word in F5 appears in the given range. However, I am adding new data to this constantly and I want to be able to copy this formula easily. Basically I want to put "D529:D541" in a cell, say L10, and then reference this cell somehow from the formula. (sort of like, =COUNTIF(ref.L10,$F$5).

Anyone know how I can do this fairly easily? I've looked at CELL("contents", L10), but it doesn't work when placed in the COUNTIF function (I think it doesn't return type range or something).

All help appreciated,

Lobo

Lobo,

What you are looking for is:

=COUNTIF(INDIRECT($L$10),$F$5)

Aladin
 
Upvote 0
thanks that worked perfectly :)

I think it should probably come up when you search for referencing cells in excel help...

thanks again for the help

Lobo
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,320
Members
448,887
Latest member
AirOliver

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top