+ Reply to Thread
Results 1 to 5 of 5

Adding a second argument to a macro..

  1. #1
    Registered User
    Join Date
    04-20-2006
    Posts
    5

    Question Adding a second argument to a macro..

    I wrote the following formula...

    =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 doesn't know how to pull only entries exclusive to my object codes. How would I stack a second argument into the formula to make it not only recognize the date but also be "True" to the object code specified?
    Last edited by My2Boyz9802; 04-21-2006 at 08:59 AM.

  2. #2
    NickHK
    Guest

    Re: Adding a second argument to a macro..

    My2Boyz9802,
    Not sure what you mean by your "macro", as this looks like a line of a
    cell's formula.
    Also, no idea what your "object code" refers to ?

    NickHK

    "My2Boyz9802" <My2Boyz9802.26lewa_1145586901.3467@excelforum-nospam.com>
    wrote in message
    news:My2Boyz9802.26lewa_1145586901.3467@excelforum-nospam.com...
    >
    > 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?
    >
    >
    > --
    > My2Boyz9802
    > ------------------------------------------------------------------------
    > My2Boyz9802's Profile:

    http://www.excelforum.com/member.php...o&userid=33704
    > View this thread: http://www.excelforum.com/showthread...hreadid=534845
    >




  3. #3
    Bob Phillips
    Guest

    Re: Adding a second argument to a macro..

    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" <My2Boyz9802.26lewa_1145586901.3467@excelforum-nospam.com>
    wrote in message
    news:My2Boyz9802.26lewa_1145586901.3467@excelforum-nospam.com...
    >
    > 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?
    >
    >
    > --
    > My2Boyz9802
    > ------------------------------------------------------------------------
    > My2Boyz9802's Profile:

    http://www.excelforum.com/member.php...o&userid=33704
    > View this thread: http://www.excelforum.com/showthread...hreadid=534845
    >




  4. #4
    Registered User
    Join Date
    04-20-2006
    Posts
    5

    Sorry, it is a formula...

    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?


    Quote Originally Posted by NickHK
    My2Boyz9802,
    Not sure what you mean by your "macro", as this looks like a line of a
    cell's formula.
    Also, no idea what your "object code" refers to ?

    NickHK

    "My2Boyz9802" <My2Boyz9802.26lewa_1145586901.3467@excelforum-nospam.com>
    wrote in message
    news:My2Boyz9802.26lewa_1145586901.3467@excelforum-nospam.com...
    >
    > 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?
    >
    >
    > --
    > My2Boyz9802
    > ------------------------------------------------------------------------
    > My2Boyz9802's Profile:

    http://www.excelforum.com/member.php...o&userid=33704
    > View this thread: http://www.excelforum.com/showthread...hreadid=534845
    >

  5. #5
    Bob Phillips
    Guest

    Re: Adding a second argument to a macro..

    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" <My2Boyz9802.26m7u0_1145624405.0674@excelforum-nospam.com>
    wrote in message
    news:My2Boyz9802.26m7u0_1145624405.0674@excelforum-nospam.com...
    >
    > 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?
    >
    >
    > NickHK Wrote:
    > > My2Boyz9802,
    > > Not sure what you mean by your "macro", as this looks like a line of a
    > > cell's formula.
    > > Also, no idea what your "object code" refers to ?
    > >
    > > NickHK
    > >
    > > "My2Boyz9802"
    > > <My2Boyz9802.26lewa_1145586901.3467@excelforum-nospam.com>
    > > wrote in message
    > > news:My2Boyz9802.26lewa_1145586901.3467@excelforum-nospam.com...
    > > >
    > > > 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?
    > > >
    > > >
    > > > --
    > > > My2Boyz9802
    > > >

    > > ------------------------------------------------------------------------
    > > > My2Boyz9802's Profile:

    > > http://www.excelforum.com/member.php...o&userid=33704
    > > > View this thread:

    > > http://www.excelforum.com/showthread...hreadid=534845
    > > >

    >
    >
    > --
    > My2Boyz9802
    > ------------------------------------------------------------------------
    > My2Boyz9802's Profile:

    http://www.excelforum.com/member.php...o&userid=33704
    > View this thread: http://www.excelforum.com/showthread...hreadid=534845
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1