Need help with formula... please help!

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)
Try:

=SUMPRODUCT((INDIRECT("Sheet1!A"&B3&":A"&B4)>B1)*(INDIRECT("Sheet1!A"&B3&":A"&B4)< B2)*(INDIRECT("Sheet1!B"&B3&":B"&B4)))<?XML:NAMESPACE PREFIX = B2)*(INDIRECT("Sheet1!B"&B3&" /><B2)*(INDIRECT("Sheet1!B"&B3&":B"&B4)))< p>

Dom
</B2)*(INDIRECT("Sheet1!B"&B3&":B"&B4)))<>
 
Upvote 0
Maybe try:

=SUMPRODUCT(--(Sheet1!A2:A13 >= B1),--(Sheet1!A2:A13 <= B2),--(ROW(Sheet1!A2:A13) >= B3),--(ROW(Sheet1!A2:A13) <= B4),Sheet1!B2:B13)

I believe you are wanting < = and > = and not just < and >, at least for the row part.

Hope that helps.
 
Last edited:
Upvote 0
Re: Need help with macro - plz read second question inside!! thx. =))

thx. guys, I tried the first formula and it worked great so i didn't bother with the second one =))

SECOND QUESTION!!

I also have another question having to do with macros: I have a workbook with many sheets but I want limit which macros can be launched from the active sheet.... can this be done or does the alt+key always launch the macro regardless which sheet I'm in?
 
Upvote 0
Re: Need help with macro - plz read second question inside!! thx. =))

The Alt+F8 will always let you see all the macros within the workbook unless they are marked as private.

You could put an if statement in your macro code, that ended the amcro if it wasn't the correct sheet. Maybe something like:

Code:
if activesheet.name = "Sheet1" or activesheet.name = "Sheet2" then end

or if you want to include sheets it could be:

Code:
if activesheet.name <> "Sheet1" or activesheet.name <> "Sheet2" then end
Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,742
Members
448,989
Latest member
mariah3

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