Trying to do Sumif using the worksheet no

mushmoom

Board Regular
Joined
May 2, 2003
Messages
84
Hi there

I dont know if i will be able to explain this but here I go.

I am trying to to a sumif to get the result in a different sheet the first thing i need to do is to find sheetnames from workbook then once the workbookname is fund then set the range and the usual,

here I try to explian again in

Where (workbook(sheetname)=A1,sumif(workbook!sheetA1!A1:A30,D1,Workbook!sheetA1!D1:D30)

and i need this to work for to workbook is it possiable.

thanks

I hope i have explained it .
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
take a look at the INDIRECT function in Help.

INDIRECT essentially evaluates the string within ()

ie

=INDIRECT("A1") translates as =A1
=INDIRECT("Sheet1!A1") translates as =Sheet1!A1

If say cell A1 = "SUM(Sheet1!B10:D10)"

=INDIRECT(A1) would translate as =SUM(Sheet1!B10:D10)

so you just need to construct a variable text string where sheet name is a variable etc...
 
Upvote 0
see column A got the sheetname what i need to do the get the data from 2 workbooks which contain sheet with the same name as in column A
 
Upvote 0

Forum statistics

Threads
1,214,397
Messages
6,119,271
Members
448,882
Latest member
Lorie1693

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