Home

merge to values in one cell

%3CLINGO-SUB%20id%3D%22lingo-sub-786624%22%20slang%3D%22en-US%22%3Emerge%20to%20values%20in%20one%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-786624%22%20slang%3D%22en-US%22%3E%3CP%3Ehi%20team%2C%3C%2FP%3E%3CP%3EI%20want%20to%20ask%20that%20I%20have%20data%20in%20excel%20in%20different%20cell%2C%20and%20I%20want%20to%20merge%20two%20values%20in%20one%20cell.%3C%2FP%3E%3CP%3Efrom%20example%3B%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3Evalue%20Should%20be%20like%20this%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E12000%3C%2FTD%3E%3CTD%3E12001%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E1%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E13000%3C%2FTD%3E%3CTD%3E130002%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E2%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E14000%3C%2FTD%3E%3CTD%3E140005%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E5%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3Ekindly%20help%20me%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%26nbsp%3B%3C%2FP%3E%3CP%3EYasir%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-786624%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-786642%22%20slang%3D%22en-US%22%3ERe%3A%20merge%20to%20values%20in%20one%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-786642%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F120453%22%20target%3D%22_blank%22%3E%40M.Yasir%20Fakhr%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20use%20Concatenate()%20to%20merge%20values.%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3E%3DCONCATENATE(A3%2CA4)%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExcel%20file%20is%20also%20attached%20for%20reference.%3C%2FP%3E%3CP%3ETauqeer%20Ahmed%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-786669%22%20slang%3D%22en-US%22%3ERe%3A%20merge%20to%20values%20in%20one%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-786669%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F120453%22%20target%3D%22_blank%22%3E%40M.Yasir%20Fakhr%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20an%20alternative%2C%20you%20may%20use%20Ampersand%20(%26amp%3B)%2C%20like%20this%20in%20B2%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DIF(ISEVEN(ROW())%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EA2%26amp%3BA3%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%22%22)%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-786734%22%20slang%3D%22en-US%22%3ERe%3A%20merge%20to%20values%20in%20one%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-786734%22%20slang%3D%22en-US%22%3E%3CP%3EHI%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F120453%22%20target%3D%22_blank%22%3E%40M.Yasir%20Fakhr%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20another%20alternative%2C%20using%20OFFSET()%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3E%3DIF(ISEVEN(ROW())%2CCONCAT(A2%2COFFSET(A2%2C1%2C0))%2C%22%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EYou%20have%20now%20several%20options%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet%20us%20know%20what%20works%20best%20for%20you%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDavid%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-787356%22%20slang%3D%22en-US%22%3ERe%3A%20merge%20to%20values%20in%20one%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-787356%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F120453%22%20target%3D%22_blank%22%3E%40M.Yasir%20Fakhr%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOne%20more%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20219px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F125532iAF5DD101E6D25B65%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-ruby%22%3E%3CCODE%3E%3DIF(ROW()%3D1%2CB%242%26amp%3BB%243%2C%0A%20%20%20%20IF(INDEX(C%3AC%2CROW()-1)%3DINDEX(B%3AB%2CROW()-1)%26amp%3BINDEX(B%3AB%2CROW())%2C%0A%20%20%20%20%20%20%20%20%22%22%2C%0A%20%20%20%20%20%20%20%20INDEX(B%3AB%2CROW())%26amp%3BINDEX(B%3AB%2CROW()%2B1)%0A%20%20%20%20)%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
M.Yasir Fakhr
Occasional Contributor

hi team,

I want to ask that I have data in excel in different cell, and I want to merge two values in one cell.

from example;

 value Should be like this
1200012001
1 
13000130002
2 
14000140005
5 

kindly help me 

Thanks 

Yasir

 

4 Replies

Hi @M.Yasir Fakhr 

 

You can use Concatenate() to merge values.

=CONCATENATE(A3,A4)

 

Excel file is also attached for reference.

Tauqeer Ahmed

@M.Yasir Fakhr 

As an alternative, you may use Ampersand (&), like this in B2: 

=IF(ISEVEN(ROW()),

A2&A3,

"")

HI @M.Yasir Fakhr 

 

Here is another alternative, using OFFSET()

=IF(ISEVEN(ROW()),CONCAT(A2,OFFSET(A2,1,0)),"")

You have now several options

 

Let us know what works best for you

 

David 

@M.Yasir Fakhr 

One more

image.png

=IF(ROW()=1,B$2&B$3,
    IF(INDEX(C:C,ROW()-1)=INDEX(B:B,ROW()-1)&INDEX(B:B,ROW()),
        "",
        INDEX(B:B,ROW())&INDEX(B:B,ROW()+1)
    )
)
Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
203 Replies