# Question for a formula, if there is one for this

#### Sp3cial_k_1975

##### New Member
I have a group of numbers ex: 1, 5, 12, 16, 32, 35, 36 etc...

What I am wanting to do is take 1 and 5, 1 and 12, 1 and 16, 1 and 32, 1 and 35, 1 and 36, 5 and 12, 5 and 16, 5 and 32, etc. and combine them into the same cell.

Ex: 1, 5 = 1-5, 1, 12 = 1-12, 1, 16 = 1-16 etc.

Is there a formula to do this?

### Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

#### yearnintolearn

##### New Member
How do you mean combine? And how do you want your results to look?

#### Sp3cial_k_1975

##### New Member
I was to be able to do something like

A B C D E F G H I J K L M N O P
1 1 5 12 16 32 35 36 1-5 5-12 12-16 16-32
2 1-12 5-16 12-32
3 1-16 5-32
4 1-32
5

Where Cell K1 equals A1 as the first number and B1 as the 2nd number
K2 equals A1 as the 1st number, C1 as the 2nd number and
K3 quals A1 as the 1st number, D1 as the 2nd number

so on and so on

#### Sp3cial_k_1975

##### New Member
Maybe this will make better sence..
B1=4
C1=5
D1=10
E1=15
F1=19
G1=20
H1=22
I1=26
J1=27
K1=39
M1=52
N1=57
O1=60
P1=61
Q1=65
R1=67
S1=72
T1=77
U1=80

I am trying to figure out if there is a formula to make W1 equal 4-5 (combining B1 and C1 with a dash between numbers)
X1 would equal 4-10 (combining B1 and D1 together)

#### SQUIDD

##### Well-known Member
Would you not just put use w1 =b1&"-"&c1.this would display 4-5 in w1?, dave

#### pleeseemailme

##### Board Regular
Special K,

Does putting the formula =\$A\$1 & "-" & B1 into X1 and filling over to the right solve your situation?

#### SQUIDD

##### Well-known Member
yes sorry meant put =b1&"-"&c1 in cell w1

#### yearnintolearn

##### New Member
Its starting to become a bit more clear if your looking to "combine" and not do any sort of arithmetic to it then I believe cell W1 would contain
=(\$B\$1 & "-" & C1)
Which can be dragged over.
Mess around with that and see if it suites what you need.

#### Sp3cial_k_1975

##### New Member
Trying it now.. thanks guys

#### Sp3cial_k_1975

##### New Member
Works like a charm.. just saved me a ton of time.. thanks a lot!

Replies
4
Views
160
Replies
0
Views
138
Replies
3
Views
135
Replies
4
Views
171
Replies
6
Views
329

1,195,945
Messages
6,012,445
Members
441,701
Latest member
vnkendijs

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back