Need urgent help in excel .

%3CLINGO-SUB%20id%3D%22lingo-sub-2129295%22%20slang%3D%22en-US%22%3ENeed%20urgent%20help%20in%20excel%20.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2129295%22%20slang%3D%22en-US%22%3E%3CP%3EColumn%20A%20has%20same%20value%20but%20column%20B%20has%20different%20value%20.%26nbsp%3B%3C%2FP%3E%3CP%3Ee.g.%20236445%20has%203%20different%20email%20ID%20.%20can%20some%20one%20help%20me%20to%20put%20those%20columns%20in%20different%20columns%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%221288%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E236445%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Ekarthik.shekar%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E236445%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Evikram.shetty%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E236445%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Emurugesan.shanmugam%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Egagan.desai%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Evikram.shetty%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Esujith.vijayan%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Ejeevesh.mehta%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Emithun.vesuwala%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Erakesh.kartemp%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22508px%22%20height%3D%2230px%22%3EI%20need%20it%20as%20below%20.%20Can%20anyone%20help%20%3F%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E236445%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Ekarthik.shekar%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E236445%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22369px%22%20height%3D%2230px%22%3Emurugesan.shanmugam%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3Egagan.desai%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3Evikram.shetty%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3Esujith.vijayan%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%3CA%20href%3D%22mailto%3Ajeevesh.mehta%40test.co.in%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ejeevesh.mehta%40test.co.in%3C%2FA%3E%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3Emithun.vesuwala%40test.co.in%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2266px%22%20height%3D%2230px%22%3E210406%3C%2FTD%3E%3CTD%20width%3D%22259px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22183px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22186px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22190px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22206px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22197px%22%20height%3D%2230px%22%3Erakesh.kartemp%40test.co.in%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2129295%22%20slang%3D%22en-US%22%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-2129693%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20urgent%20help%20in%20excel%20.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2129693%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F965186%22%20target%3D%22_blank%22%3E%40Avishant%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20a%20macro%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-visual%22%3E%3CCODE%3ESub%20MoveB()%0A%20%20%20%20Dim%20r%20As%20Long%0A%20%20%20%20Dim%20m%20As%20Long%0A%20%20%20%20Dim%20c%20As%20Long%0A%20%20%20%20Application.ScreenUpdating%20%3D%20False%0A%20%20%20%20m%20%3D%20Cells(Rows.Count%2C%201).End(xlUp).Row%0A%20%20%20%20c%20%3D%202%0A%20%20%20%20For%20r%20%3D%202%20To%20m%0A%20%20%20%20%20%20%20%20If%20Cells(r%2C%201).Value%20%3D%20Cells(r%20-%201%2C%201).Value%20Then%0A%20%20%20%20%20%20%20%20%20%20%20%20c%20%3D%20c%20%2B%201%0A%20%20%20%20%20%20%20%20%20%20%20%20Cells(r%2C%202).Cut%20Destination%3A%3DCells(r%2C%20c)%0A%20%20%20%20%20%20%20%20Else%0A%20%20%20%20%20%20%20%20%20%20%20%20c%20%3D%202%0A%20%20%20%20%20%20%20%20End%20If%0A%20%20%20%20Next%20r%0A%20%20%20%20'%20Optional%0A%20%20%20%20ActiveSheet.UsedRange.EntireColumn.AutoFit%0A%20%20%20%20Application.ScreenUpdating%20%3D%20True%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
New Contributor

Column A has same value but column B has different value . 

e.g. 236445 has 3 different email ID . can some one help me to put those columns in different columns 

 

236445karthik.shekar@test.co.in     
236445vikram.shetty@test.co.in     
236445murugesan.shanmugam@test.co.in     
210406gagan.desai@test.co.in     
210406vikram.shetty@test.co.in     
210406sujith.vijayan@test.co.in     
210406jeevesh.mehta@test.co.in     
210406mithun.vesuwala@test.co.in     
210406rakesh.kartemp@test.co.in     
       
I need it as below . Can anyone help ?    
       
236445karthik.shekar@test.co.in     
236445 murugesan.shanmugam@test.co.in   
210406gagan.desai@test.co.in     
210406 vikram.shetty@test.co.in    
210406  sujith.vijayan@test.co.in   
210406   jeevesh.mehta@test.co.in  
210406    mithun.vesuwala@test.co.in 
210406     rakesh.kartemp@test.co.in
3 Replies

@Avishant 

Here is a macro:

Sub MoveB()
    Dim r As Long
    Dim m As Long
    Dim c As Long
    Application.ScreenUpdating = False
    m = Cells(Rows.Count, 1).End(xlUp).Row
    c = 2
    For r = 2 To m
        If Cells(r, 1).Value = Cells(r - 1, 1).Value Then
            c = c + 1
            Cells(r, 2).Cut Destination:=Cells(r, c)
        Else
            c = 2
        End If
    Next r
    ' Optional
    ActiveSheet.UsedRange.EntireColumn.AutoFit
    Application.ScreenUpdating = True
End Sub

@Hans Vogelaar  can this be possible on excel ?  I do not know macros 

@Avishant 

Press Alt+F11 to activate the Visual Basic Editor.

Select Insert > Module to create a new code module.

Copy the code from my previous reply and paste it into the module.

With the insertion point anywhere in the code, press F5 to run the macro.

Switch back to Excel to view the result.

If you want to keep the macro, save the workbook as a macro-enabled workbook (.xlsm)