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 .
 

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
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...
 

mushmoom

Board Regular
Joined
May 2, 2003
Messages
84
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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,281
Messages
5,600,720
Members
414,401
Latest member
grenona2020

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