Using CONCAT to CountA from multiple WB's

cbarryb

New Member
Joined
Jun 1, 2012
Messages
25
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
I have a list of workbook names and the sheet names that I would like to use the counta in column B. I have used this formula to pull all of the data together so that I have a string of text that duplicates if I was to have written the formula for the individual book. i.e:

Excel Formula:
=COUNTA('[ROYS - 01.06.2021 BBC.xlsx]01.06.2021 GBP '!$B2:$B500)

I have searched and found this code to bring the CONCAT into the Function:

Excel Formula:
=SUMPRODUCT(COUNTA(INDIRECT("'["&F3&"'!$B:$B")))

The cells that I have =CONCAT, bring this text back and is added to the SUMPRODUCT formula:

ROYS - 01.06.2021 BBC.xlsx]01.06.2021 GBP​

The first cell brings back a correct amount of lines, but If I copy this down, I get the number 1 only, where there should be more than 5 and some are over 100 lines.

Can anyone see where I am going wrong please or have a simpler way of doing this maybe?

Thanks
 

Attachments

  • mrexcel1.png
    mrexcel1.png
    68.9 KB · Views: 4

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

StephenCrump

MrExcel MVP
Joined
Sep 18, 2013
Messages
4,304
Office Version
  1. 365
Platform
  1. Windows
Are you accidentally adding a space when you concatenate workbook and worksheet names?

For example, is your first worksheet '01.06.2021 GBP ' as shown? Or rather '01.06.2021 GBP'?
 

cbarryb

New Member
Joined
Jun 1, 2012
Messages
25
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Are you accidentally adding a space when you concatenate workbook and worksheet names?

For example, is your first worksheet '01.06.2021 GBP ' as shown? Or rather '01.06.2021 GBP'?
Thanks for your reply, I did check all through them and I don't have the space at the end now and I'm still not getting the result I need. I think I'm trying to over complicate this, I will keep working on this and post when I've found the answer, I'll reply
 

Forum statistics

Threads
1,144,341
Messages
5,723,806
Members
422,518
Latest member
quack_quack

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
Top