Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

From input of this kind:

CUSTOMERCODE DATE        QTY
890550       16/04/2013  10
890550       16/04/2013  20
890550       17/04/2013  20
890551       18/04/2013  30
890551       18/04/2013  30
890551       18/04/2013  30

how may I achieve the following result with a macro?:

CUSTOMERCODE DATE        QTY
890550       16/04/2013  30
890550       17/04/2013  20
890551       18/04/2013  90
share|improve this question

closed as not a real question by Oliver Salzburg Apr 24 '13 at 9:34

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Please read the FAQ on how to ask a question! –  Simon Apr 24 '13 at 6:32
    
So you want to sum the qty column by customer code and date? –  Tog Apr 24 '13 at 6:54
    
Hi Billie. Welcome to SU. As Simon says, please read our FAQ and be specific on "how to ask questions"..! Simply providing some data doesn't make a question ;-) –  Waffle's Crazy Peanut Apr 24 '13 at 7:06

1 Answer 1

In essence a PivotTable is all that is all that is required:

SU586940 example

but if you must apply a macro then you could record something that 'fills in the gaps' so that if, for example, CUSTOMERCODE is in E1 D2 has the formula =IF(ISBLANK(E2),E1,E2) and this is copied down as required.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.