Steve_Brady
asked on
Using the Indirect() function in Excel
Hello,
In Excel (2007), I'm having trouble using the Indirect() function. Can someone tell me how to tweak this formula so it does not bring up an error message?
Suppose that the listed cells contain the following values:
J2 = s, K2 = 3
J3 = y, K3 = 9
and I want to create a variable =COUNTIF range reference based on those four cells so that the values in those cells define the search range:
i.e. range = col (J2) & row (K2) : col (J3) & row (K3)
or for the values above,
=COUNTIF(S3:Y9,A1)
And for these values:
J2 = m, K2 = 4
J3 = w, K3 = 7
the range would be thus:
=COUNTIF(M4:W7,A1)
and so forth.
I assumed the following would do it:
=COUNTIF(INDIRECT(J2)&INDI RECT(K2):I NDIRECT(J3 )&INDIRECT (K3),A1)
but I'm obviously mistaken in that assumption.
What am I missing?
Thanks
In Excel (2007), I'm having trouble using the Indirect() function. Can someone tell me how to tweak this formula so it does not bring up an error message?
Suppose that the listed cells contain the following values:
J2 = s, K2 = 3
J3 = y, K3 = 9
and I want to create a variable =COUNTIF range reference based on those four cells so that the values in those cells define the search range:
i.e. range = col (J2) & row (K2) : col (J3) & row (K3)
or for the values above,
=COUNTIF(S3:Y9,A1)
And for these values:
J2 = m, K2 = 4
J3 = w, K3 = 7
the range would be thus:
=COUNTIF(M4:W7,A1)
and so forth.
I assumed the following would do it:
=COUNTIF(INDIRECT(J2)&INDI
but I'm obviously mistaken in that assumption.
What am I missing?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER