Please Correct the Formula

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,860
Office Version
  1. 365
Platform
  1. Windows
=SUMIF(INDIRECT(C1&"!$AE:$AE"),$A7,INDIRECT(C1&"!$Y:$Y"))

thanks
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Are you getting an error?

If sheet name in C1 has spaces (or is numeric) that won't work, you need

=SUMIF(INDIRECT("'"&C1&"'!$AE:$AE"),$A7,INDIRECT("'"&C1&"'!$Y:$Y"))
 
Upvote 0
Ok let me check it again Barry.
and C1 has tab name that is Month.
 
Upvote 0
Are you getting an error?

If sheet name in C1 has spaces (or is numeric) that won't work, you need

=SUMIF(INDIRECT("'"&C1&"'!$AE:$AE"),$A7,INDIRECT("'"&C1&"'!$Y:$Y"))


Aaah,

October in C1 was 10/01/2011 and formated as mmmm.

Thanks Barry and Expiry.
 
Upvote 0
If you use TEXT function in your formula then C1 could be either text or a formatted date, it won't matter

=SUMIF(INDIRECT(TEXT(C1,"mmmm")&"!$AE:$AE"),$A7,INDIRECT(TEXT(C1,"mmmm")&"!$Y:$Y"))
 
Upvote 0
Thank you Barry, but what if I want to use SUMPRODUCT, How would I change it.

Thanks a lot.
 
Upvote 0
And this is what I am doing that is not working.

=SUMPRODUCT(INDIRECT("'"&C1&"'!$A:$A)=A2)*(INDIRECT("'"&C1&"'!$AD:$AD)=B2)*(INDIRECT("'"&C1&"'!$Y:$y))
Please help

Thanks
 
Last edited:
Upvote 0
Thank you Aladin,

When I put this formula,

'=SUMPRODUCT((INDIRECT("'"&C1&"'!$A1:$A14919")=A2)*(INDIRECT("'"&C1&"'!$AD1:$AD14919)=B2)*(INDIRECT("'"&C1&"'!$Y1:$y)14919))

it says "The formula you typed contains an error"

and highlights the last quotes.

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,282
Members
452,902
Latest member
Knuddeluff

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