ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using labels in formulas (https://www.excelbanter.com/excel-worksheet-functions/155279-using-labels-formulas.html)

Joseph

Using labels in formulas
 
Hi,

I have a small prob. I have a formula where the cell co-ordinates will have
to change based on the value available in another cell. For eg.,

If formula is

=COUNTIF(Sheet1!$W$1:$W$500,B7)

I want the number 500 to be picked from another cell which contains the
exact number or rows.

How can I achieve this?

Thanks in advance.

- Joseph


Bob Phillips

Using labels in formulas
 
=COUNTIF(INDIRECT("Sheet1!$W$1:$W$"&M1),B7)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Joseph" wrote in message
...
Hi,

I have a small prob. I have a formula where the cell co-ordinates will
have
to change based on the value available in another cell. For eg.,

If formula is

=COUNTIF(Sheet1!$W$1:$W$500,B7)

I want the number 500 to be picked from another cell which contains the
exact number or rows.

How can I achieve this?

Thanks in advance.

- Joseph




Joseph

Using labels in formulas
 
Thanks ...It worked!!!


"Bob Phillips" wrote:

=COUNTIF(INDIRECT("Sheet1!$W$1:$W$"&M1),B7)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Joseph" wrote in message
...
Hi,

I have a small prob. I have a formula where the cell co-ordinates will
have
to change based on the value available in another cell. For eg.,

If formula is

=COUNTIF(Sheet1!$W$1:$W$500,B7)

I want the number 500 to be picked from another cell which contains the
exact number or rows.

How can I achieve this?

Thanks in advance.

- Joseph





Stan Brown

Using labels in formulas
 
Wed, 22 Aug 2007 02:46:00 -0700 from Joseph
:
I have a small prob. I have a formula where the cell co-ordinates will have
to change based on the value available in another cell.


See the INDIRECT function in Help.

--
"First prove what you're saying, then whine about it."
-- /The People's Court/
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/


All times are GMT +1. The time now is 03:09 PM.

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