Need help building VBA or excel macros for columns

%3CLINGO-SUB%20id%3D%22lingo-sub-2080478%22%20slang%3D%22en-US%22%3ENeed%20help%20building%20VBA%20or%20excel%20macros%20for%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2080478%22%20slang%3D%22en-US%22%3E%3CP%3ESo%20i%20need%20to%20consolidate%20data%20from%20a%20column%20on%20a%20different%20sheet%20to%20another.%20Essentially%2C%20i%20need%20this%3C%2FP%3E%3CTABLE%20width%3D%22301%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2275px%22%20height%3D%2230px%22%3Eanimal%3C%2FTD%3E%3CTD%20width%3D%22152px%22%20height%3D%2230px%22%3Eqty%3C%2FTD%3E%3CTD%20width%3D%2273px%22%20height%3D%2230px%22%3Edate%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2275px%22%20height%3D%2240px%22%3Edog%3C%2FTD%3E%3CTD%20width%3D%22152px%22%20height%3D%2240px%22%3E12%3C%2FTD%3E%3CTD%20width%3D%2273px%22%20height%3D%2240px%22%3EJan%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2275px%22%20height%3D%2230px%22%3Ecat%3C%2FTD%3E%3CTD%20width%3D%22152px%22%20height%3D%2230px%22%3E11%3C%2FTD%3E%3CTD%20width%3D%2273px%22%20height%3D%2230px%22%3EMar%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2275px%22%20height%3D%2230px%22%3Edog%3C%2FTD%3E%3CTD%20width%3D%22152px%22%20height%3D%2230px%22%3E10%3C%2FTD%3E%3CTD%20width%3D%2273px%22%20height%3D%2230px%22%3Ejan%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2275px%22%20height%3D%2230px%22%3Emouse%3C%2FTD%3E%3CTD%20width%3D%22152px%22%20height%3D%2230px%22%3E6%3C%2FTD%3E%3CTD%20width%3D%2273px%22%20height%3D%2230px%22%3EJan%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETurned%20into%20this%3A%3C%2FP%3E%3CTABLE%20width%3D%22301%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2276%22%3Eanimal%3C%2FTD%3E%3CTD%20width%3D%22152%22%3Eqty%3C%2FTD%3E%3CTD%20width%3D%2273%22%3Edate%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3Edog%3C%2FTD%3E%3CTD%3E22%3C%2FTD%3E%3CTD%3Ejan%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3Ecat%3C%2FTD%3E%3CTD%3E11%3C%2FTD%3E%3CTD%3Emar%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3Emouse%3C%2FTD%3E%3CTD%3E6%3C%2FTD%3E%3CTD%3Ejan%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3EI'm%20trying%20to%20consolidate%20the%20columns%20on%20rules%20of%20category%20and%20date%2C%20while%20adding%20up%20the%20qty%20of%20the%20category.%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20help%20me%20with%20this%3F%20I%20have%20spent%20the%20last%205%20hours%20trying%20to%20code%20this%20out%20or%20create%20rules%20with%20an%20action%20button%20and%20have%20nothing%20to%20show%20for%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2080478%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2080534%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20building%20VBA%20or%20excel%20macros%20for%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2080534%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F936767%22%20target%3D%22_blank%22%3E%40Noxie%3C%2FA%3E%26nbsp%3BI%20think%20PowerQuery%20would%20be%20a%20better%20option%20to%20group%20your%20data%20by%20the%20'animal'%20column.%20Can%20share%20the%20workbook%2C%20removing%20any%20sensitive%20data%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2082959%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20building%20VBA%20or%20excel%20macros%20for%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082959%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F867265%22%20target%3D%22_blank%22%3E%40adversi%3C%2FA%3E%26nbsp%3B%20here%20is%20a%20file%20with%20data%20removed.%26nbsp%3B%20i'm%20trying%20to%20consolidate%20qty%20by%20item%20number%20and%20date.%20So%20all%20items%20that%20falls%20in%20january%20under%20item%20number%2012345%20would%20sow%20as%20a%20single%20row.%20Any%20ideas%3F%20I've%20tried%20using%20pivot%20tables%20but%20im%20making%20this%20for%20someone%20else%2C%20and%20requiring%20them%20to%20count%20is%20not%20realistic...%20I%20highlighted%20the%20fields%20as%20well%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

So i need to consolidate data from a column on a different sheet to another. Essentially, i need this

animalqtydate
dog12Jan
cat11Mar
dog10jan
mouse6Jan

 

Turned into this:

animalqtydate
dog22jan
cat11mar
mouse6jan

I'm trying to consolidate the columns on rules of category and date, while adding up the qty of the category. 

Can anyone help me with this? I have spent the last 5 hours trying to code this out or create rules with an action button and have nothing to show for it.

3 Replies

@Noxie I think PowerQuery or inserting a Pivot Table would be a better option to group your data by the 'animal' column. Can share the workbook, removing any sensitive data

@adversi  here is a file with data removed.  i'm trying to consolidate qty by item number and date. So all items that falls in january under item number 12345 would sow as a single row. Any ideas? I've tried using pivot tables but im making this for someone else, and requiring them to count is not realistic... I highlighted the fields as well

@Noxie Apologies for the delay -- a Pivot Table should be able to do this for you. See attached a sample workbook