Result of SUMIF in different worksheet

pwillia

New Member
Joined
Feb 6, 2012
Messages
34
Hello,

Just a quick (and I'm sure, easy) question regarding SUMIF across worksheets. Basically I have written my SUMIF to work perfectly on my first worksheet which is fine. However, instead of the output being on the first worksheet (same worksheet as SUMIF), I would like the output to be displayed on my second work sheet.
Here's what I have so far:

Code:
Range("sheet2name!a3:a26").Formula = "=SumIf(sheet1name!$U$4:$u$150, sheet1name!ae3, sheet1name!$ab$4:$ab$100)"

As you can see I am referencing the sheets at every point in the statement. This isn't working, can somebody please help me with why? I have tried numerous variations, but I'm new to working across sheets.

Thank you so much for your time!

Pete.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try somethhing like this...

Sheets("Sheet2").Range("A3:A26").Formula = "=SumIf(Sheet1!$U$4:$U$150, Sheet1!AE3, Sheet1!$AB$4:$AB$100)"
 
Upvote 0
Thank you for your help, this works perfectly. I also realised I had an error due to one spelling mistake! Thank you once again :biggrin:
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

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