Help with formula

Russk68

Well-known Member
Joined
May 1, 2006
Messages
589
Office Version
  1. 365
Platform
  1. MacOS
Hi All,
I need to enter values in a cell similar to this 33/35/56/65. It can be single digits or up to 4 digits and max of 20 slashes. I would then like the next 20 cells below to be able to fill in each number separately.

Example:
33/35/56/65
Result:
33
35
56
65
Your help is greatly appreciated!

Russ
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
33/357/5678/65
33
357
5678
65
this macro has been applied
Sub Macro4()
'
' Macro4 Macro
' Macro recorded 12/11/2018 by bob
'
'
rrow = 1
mytarget = Cells(1, 1)
50 For j = 1 To 10
If Mid(mytarget, j, 1) = "/" Then temp = Mid(mytarget, 1, j - 1): rrow = rrow + 1: mytarget = Mid(mytarget, j + 1, 999): Cells(rrow, 1) = temp: GoTo 50
Next j
Cells(rrow + 1, 1) = mytarget
100 End Sub

<colgroup><col><col span="20"></colgroup><tbody>
</tbody>
 
Upvote 0
Hi,

Here's a formula solution.
Assuming data in A1, formula in A2 copied down to A21 or as far as needed (Formula results in Text, Not real numbers, in case you have data with leading zero).
Alternatively, use B2 formula, results converted to Real Numbers, Leading zeros, if any, will be removed:


Book1
AB
133/35/56/0101/6533/35/56/0101/65
23333
33535
45656
50101101
66565
Sheet357
Cell Formulas
RangeFormula
A2=TRIM(MID(SUBSTITUTE(A$1,"/",REPT(" ",255)),ROWS(A$2:A2)*255-254,255))
B2=IFERROR(MID(SUBSTITUTE(B$1,"/",REPT(" ",255)),ROWS(B$2:B2)*255-254,255)+0,"")
 
Last edited:
Upvote 0
Hi J
I just used your B2 formula and dragged to B21 and it works just like I asked. I'm trying to repeat it in the same column. I entered your formula in B23 and updated it to: =IFERROR(MID(SUBSTITUTE(B$22,"/",REPT(" ",255)),ROWS(B$23:B23)*255-254,255)+0,"") and dragged it down. I does not work when I do this. Should it?
Thank you very much for your help!
 
Upvote 0
You're welcome, great it worked for you, let us know if you need further help.
 
Upvote 0

Forum statistics

Threads
1,215,032
Messages
6,122,772
Members
449,095
Latest member
m_smith_solihull

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top