Help With Formula (Using A Reference In A Range)

CaliKidd

Board Regular
Joined
Feb 16, 2011
Messages
173
I have a simple Excel 2003 workbook, consisting of 4 sheets named REF, CAT 1, CAT 2, and Summary.

On the Summary Sheet, I have the following formula:

=COUNTIF('CAT 2'!A5:A65536,'CAT 1'!A1)

Basically, it just tallies the number of matches it finds in the range A5:A65536 of the CAT 2 sheet using a criteria I've placed in cell A1 of the CAT 1 sheet.

Here's the problem:
In the formula, instead of referring to the last row explicitly (65536), I would like to use a reference to cell A1 of the REF sheet. I would use Application.Rows.count to place the last row value in cell A1 of the REF sheet so that if someone was using Excel 2007 or higher, the value of that cell would be 1048576, not 65536.

I tried the following combinations using a concatenation approach (my modifications in red), but they didn't work:
=COUNTIF('CAT 2'!A5:A & REF!A1,'CAT 1'!A1)

=COUNTIF("'CAT 2'!A5:A" & REF!A1,'CAT 1'!A1)

=COUNTIF('CAT 2'!"A5:A" & REF!A1,'CAT 1'!A1)

=COUNTIF('CAT 2'!"A5:A & REF!A1",'CAT 1'!A1)

Can someone please tell me what the formula (in A1 format, not R1C1 format) should be?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,673
Members
452,937
Latest member
Bhg1984

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