+ Reply to Thread
Results 1 to 4 of 4

Macro to SumIF a reference Quantity

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Question Macro to SumIF a reference Quantity

    I have a query of data that I need to reorgainize using a macro. I basically need to sumif colum L "TEAM" by referencing it's quantity in column G but the kicker is that I need an absolute value. Then, I need to copy the accounts that make up the sum and place it under the amount column D in worksheet "allocation". I need to loop this through data that will always change. The attached shows my end result better. Your help with be greatly appreciated. Thank you.

    Here is what I have so far but doesn't seem to work.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to SumIF a reference Quantity

    Hi dirock,

    Maybe:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    08-01-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Macro to SumIF a reference Quantity

    Unfortunately this code doesn't work. The team column doesn't get updated when it sums the quantity per team. Ok if you look at the allocation tab you will see what I need the code to cut and paste. So each team has a sum total amount that needs to be cut and pasted over the to allcoation tab along with pos_ind,underlying_Cusip, sum of quantiy,team, Settleday = today(), and Reason code will always be VO. Under the Amount cell I need to paste in the Account and quantity per acct. See the allocation tab before the end result.

    I know this is a lot and I can hopefully figure out most of it but I just need a start with the looping and cut and paste process. Please help...

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to SumIF a reference Quantity

    Hi Dirock,

    This code will do what your code suggests:

    Please Login or Register  to view this content.
    Last edited by xladept; 09-12-2012 at 02:33 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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