Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine numbers

Status
Not open for further replies.

Drej

Mechanical
Jul 31, 2002
971
I have several columns of numbers in my Excel spreadsheet like so:


80 500 2 35
80 535 3 21
..
..
..


Can anyone tell me how I can combine the numbers for one row and place them at the end column to form the number in this format 80-500-2-35?

Cheers for any help.

-- drej --
 
Replies continue below

Recommended for you

Assuming that
A1 = 80
B1 = 500
C1 = 2
D1 = 35

Then you can concatenate them together in E1 with the following formula:
Code:
=TRIM(A1) & "-" & TRIM(B1) & "-" & TRIM(C1) & "-" & TRIM(D1)

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
you don't necessarily need the TRIM function, either. If the values are indeed numerical only, then the trim function will have no effect and =A1&"-"&B1&"-"&C1&"-"&D1 will yield the same result.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor