View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Writing a formula which dynamically generates results

With source data in Sheet1's cols A & B, from row 2 down

In Sheet3,

In A2:
=IF(Sheet1!A2="","",IF(COUNTIF(Sheet1!A$2:A2,Sheet 1!A2)1,"",ROW()))
Leave A1 blank

In B2:
=IF(ROWS($1:1)COUNT(A:A),"",INDEX(Sheet1!A:A,SMAL L(A:A,ROWS($1:1))))

In C2:
=IF(B2="","",SUMIF(Sheet1!A:A,B2,Sheet1!B:B))
Select A2:C2, copy down to cover the max expected extent of data in Sheet1's
col A.
Hide away col A. Cols B & C returns the required results, as before.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"sandeep singh" wrote:
Thanks alot !
Can you also tell me how to modify formula, if I want to put the formula in
some other sheet say sheet3 and data is present in sheet1?

Regards,
Sandeep