View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
papou papou is offline
external usenet poster
 
Posts: 110
Default Group and SUM

Hi
There is no need for a macro to achieve this.
In sheet2:
place in column A the # S numbers
formula in column B : =SUMIF(Sheet1!A1:A10,A1,Feuil1!B1:B10)
Drag down formula in column B.

HTH
Cordially
Pascal

"Ananth" a écrit dans le message de news:
...
Macro Help

I have in Sheet1 INPUT as under

INPUT
Col-A Col-B

S1 1
S2 1
S3 1
S4 1
S5 1
S1 2
S2 3
S3 4
S4 5
S5 6

I want to use Macro and produce an output in Sheet2 as under. Essentially
I
want to group Col-A and see a summation in Col-C

Any help will be greatly appreciated by this Macro Novice.

OUTPUT

Col-A Col-B Col-C Col-D
S1 1 2 3
S2 1 3 4
S3 1 4 5
S4 1 5 6
S5 1 6 7