SOLVED

Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-712505%22%20slang%3D%22en-US%22%3EExcel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-712505%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20different%20categories%20such%20as%20%22Asset%20Class%22.%20They%20each%20have%20a%20series%20of%20assets%20in%20each%20category%2C%20such%20as%205%20domestic%20stocks%2C%2010%20international.%20I%20want%20a%20formula%20to%20sum%20up%20the%20total%20of%20each%20category%20based%20on%20asset%20class.%20Excel%20spreadsheet%20is%20attached%2C%20and%20data%20is%20on%20the%20%22Fund%20Manager%20Attribution%22%20tab.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20assist.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-712505%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-712638%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-712638%22%20slang%3D%22en-US%22%3EHi%20%3CBR%20%2F%3EIt%20sounds%20like%20you%20need%20to%20use%20a%20SUMIFS%20formula%3CBR%20%2F%3E%3CBR%20%2F%3E%3D%20SUMIFS%20(%20Column%20to%20Sum.%2C%20Column1%2C%20Criteria1%2C%20Column2%2C%20Criteria2%20etc)%3CBR%20%2F%3E%3CBR%20%2F%3EIt's%20not%20clear%20from%20the%20attached%20file%20what%20you%20are%20trying%20to%20achieve%20sorry%20so%20I%20haven't%20added%20an%20example%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-712639%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-712639%22%20slang%3D%22en-US%22%3EI%20suggest%20you%20manually%20enter%20your%20desired%20results%20and%20then%20explain%20how%20you%20arrived%20at%20those%20results%20so%20that%20the%20relevant%20formula%20to%20correctly%20return%20them%20may%20be%20reasonably%20deciphered.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-712682%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-712682%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20reply.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20issue%20with%20my%20data%20is%20all%20the%20relevant%20values%20are%20in%20different%20columns%2C%20this%20has%20meant%20i%20have%20been%20unable%20to%20determine%20how%20to%20a%20sumif%20formula.%20I%20have%20attached%20a%20file%20which%20shows%20my%20data%2C%20it%20has%20the%20column%20for%20each%20shares%20returns.%20As%20i%20have%20large%20number%20of%20stocks%2C%20i%20am%20looking%20for%20a%20formula%20that%20will%20just%20for%20the%20selected%20stock%20between%20two%20given%20dates.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20let%20me%20know%20any%20questions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20kindly%20for%20your%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECalof1%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-712724%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-712724%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F364226%22%20target%3D%22_blank%22%3E%40calof1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETake%20a%20look%20at%20the%20attached%20to%20see%20if%20it's%20what%20you%20need%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-712825%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-712825%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20reply.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20formula%20will%20match%20my%20needs%20for%20date%20range.%20As%20my%20data%20is%20spreadout%20amongst%20many%20columns%2C%20do%20you%20have%20an%20idea%20on%20how%20to%20get%20it%20to%20select%20the%20relevant%20column%20to%20sum%20up%20based%20on%20the%20stock%20code.%20Eg%20i%20set%20the%20criteria%20to%20SGH%2C%20and%20the%20formula%20will%20read%20the%20column%20for%20SGH%3F%20Essentially%20i%20am%20looking%20to%20incorporate%20the%20Stock%20Code%20being%20the%20indentifer%20for%20it%20sum%20up%20the%20relevant%20column.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-713086%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-713086%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F364226%22%20target%3D%22_blank%22%3E%40calof1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20attached%20file%2C%20the%20formula%20in%20H8%2C%20copied%20across%20to%20J8%2C%20is%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DSUMIFS(INDEX(StockTable%2C0%2CMATCH(H7%2CStockLabels%2C0))%2C%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EINDEX(StockTable%2C0%2C1)%2C%22%26gt%3B%3D%22%26amp%3B%24H5%2C%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EINDEX(StockTable%2C0%2C1)%2C%22%26lt%3B%3D%22%26amp%3B%24H6)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ENote%20the%20following%20defined%20names%20therein%3A%26nbsp%3B%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3EName%3C%2FTD%3E%3CTD%3EFormula%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EStockLabels%3C%2FTD%3E%3CTD%3E%3DSheet1!%24A%241%3AINDEX(Sheet1!%241%3A%241%2CCOUNTA(Sheet1!%241%3A%241))%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EStockTable%3C%2FTD%3E%3CTD%3E%3DSheet1!%24A%242%3AINDEX(Sheet1!%241%3A%241048576%2C1048576%2CCOLUMNS(StockLabels))%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-713119%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-713119%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F364226%22%20target%3D%22_blank%22%3E%40calof1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMy%20solution%20attached%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-715830%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-715830%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%2C%20much%20appreciated%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-715831%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-715831%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%2C%20much%20appreciated%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F9832%22%20target%3D%22_blank%22%3E%40Wyn%20Hopkins%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
calof1
Contributor

Hi,

 

I have different categories such as "Asset Class". They each have a series of assets in each category, such as 5 domestic stocks, 10 international. I want a formula to sum up the total of each category based on asset class. Excel spreadsheet is attached, and data is on the "Fund Manager Attribution" tab.

 

Please assist.

 

Kind regards,

9 Replies
Hi
It sounds like you need to use a SUMIFS formula

= SUMIFS ( Column to Sum., Column1, Criteria1, Column2, Criteria2 etc)

It's not clear from the attached file what you are trying to achieve sorry so I haven't added an example
I suggest you manually enter your desired results and then explain how you arrived at those results so that the relevant formula to correctly return them may be reasonably deciphered.

Hi @Wyn Hopkins 

 

Thank you for the reply. 

 

The issue with my data is all the relevant values are in different columns, this has meant i have been unable to determine how to a sumif formula. I have attached a file which shows my data, it has the column for each shares returns. As i have large number of stocks, i am looking for a formula that will just for the selected stock between two given dates.

 

Please let me know any questions.

 

Thank you kindly for your help.

 

Calof1

@calof1 

 

Take a look at the attached to see if it's what you need

Hi@Wyn Hopkins 

 

Thank you for the reply. 

 

The formula will match my needs for date range. As my data is spreadout amongst many columns, do you have an idea on how to get it to select the relevant column to sum up based on the stock code. Eg i set the criteria to SGH, and the formula will read the column for SGH? Essentially i am looking to incorporate the Stock Code being the indentifer for it sum up the relevant column.

 

Thanks again,

@calof1 

In the attached file, the formula in H8, copied across to J8, is: 

=SUMIFS(INDEX(StockTable,0,MATCH(H7,StockLabels,0)),
INDEX(StockTable,0,1),">="&$H5,
INDEX(StockTable,0,1),"<="&$H6)

Note the following defined names therein: 

NameFormula
StockLabels=Sheet1!$A$1:INDEX(Sheet1!$1:$1,COUNTA(Sheet1!$1:$1))
StockTable=Sheet1!$A$2:INDEX(Sheet1!$1:$1048576,1048576,COLUMNS(StockLabels))
Solution

@calof1 

 

My solution attached

 

Thank you, much appreciated@Twifoo 

Thank you, much appreciated@Wyn Hopkins