Adding a second argument to a macro..

M

My2Boyz9802

:confused: I wrote the following macro...

=SUMIF('AP-24X7'!$P:$P,"="&(TEXT(C$5,"mmm-yy")),'SP-24X7'!$L:$L)

It pulls the data I need like a charm,however it doen't know how to
pull only entries exclusive to my object codes. How would I stack a
second argument into the macro to make it not only recognize the date
but also be "True" to the object code specified?
 
B

Bob Phillips

Maybe something like

=SUMPRODUCT(--('AP-24X7'!$P2:$P200=(TEXT(C$5,"mmm-yy"))),--('AP-24X7'!$R2:$R
200="some value"),'SP-24X7'!$L2:$L200)

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range.

BTW this is not a macro, it is a formula.


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"My2Boyz9802" <[email protected]>
wrote in message
news:[email protected]...
 
M

My2Boyz9802

Your correct this is a formula.

I am just so fried trying to figure out how to build this formula, I'm
liable not to know my own name.

What I'm trying to do is;
Build a general ledger with multiple tabs that refer to 14 different
cost centers. Each of the cost centers spend from 63 different "Object
Codes" for Example 56200 - IT Consultants Design/Development. I need to
pull together into a roll-up page the summary of all expenses on a
monthly basis spent in each object code, by each of the cost centers (A
Net Roll-Up).

So ultimately I need to construct a formula that will go to all 14
worksheets look for exclusive data that refers to the date and also the
object code (ie. 56200), and return the data back to my designated
roll-up page.

Hopefully I've made myself more comprehensive?
 
B

Bob Phillips

Create a sumproduct formula with two conditions as I showed you in my
previous response on every sheet specific tho that sheet in the same cell on
every sheet, then just SUM them all on a summary sheet

=SUM('First sheet:Last sheet'!A10)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"My2Boyz9802" <[email protected]>
wrote in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top