Help with INDIRECT function please

Harryf

Board Regular
Joined
Aug 31, 2013
Messages
52
Hi there everybody!

I simply cannot seem to win this one...

In a countifs function, I refer to the range in the function as being A2 to A8, i.e. Countifs(A2:A8;"whatever").

But I want to type the numbers of the starting row of the range (i.e. 2) and the ending row (8) in cells A10 and A11 and use these numbers to reference the actual range in the function instead of typing "A2:A8.

So, in cell A10, I will have 2 and in cell A11, I will have 8. In the countifs function, I would like to use something to concatenate the column number (A) in the function to the numbers in cells A10 and A11. So, the first A must be linked to 2 (becoming A2 in the function) while the second A must be linked to the 8 and reference A8...

I tried INDIRECT but cannot seem to get anything right...

Any help is sincerely appreciated.

Kind regards

Harry
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try this:
Excel Formula:
=COUNTIF(INDIRECT("A" & A10 & ":A" & A11);"whatever")
 
Upvote 0
Personally, I'd prefer INDEX over INDIRECT:

Excel Formula:
=COUNTIF(INDEX(A:A;A10):INDEX(A:A;A11);"whatever")
 
Upvote 0
Hi Rory!

Your solution is PERFECT! Thank you!! Yay!!

Thanks for the try, Joe! We both learned something new... Cool...;)
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,786
Members
452,942
Latest member
VijayNewtoExcel

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