Trying to split only dash ("-") within text values in column A (A2:A7) into column B. See sample data.
Please Login or Register to view this content.
Trying to split only dash ("-") within text values in column A (A2:A7) into column B. See sample data.
Please Login or Register to view this content.
You could probably use Text2Columns?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
looking for a formula to split it out as the data set is huge.
Thanks
T2C would do it quicker than a formula, but try these...
for the 1st part...
=LEFT(A2,FIND("-",A2,1)-2)
for the 2nd part...
=RIGHT(A2,LEN(A2)-FIND("-",A2,1)-1)
FDibbins: only need the dashes to be extracted from the values and not the values. for example, Jan - sales is bad, formula should only extract the - from the cell.
Thanks
Select cell A2 then Control + Shift + Down Arrowlooking for a formula to split it out as the data set is huge.
This will select all your data instantly, even if it goes to the last cell in the worksheet.
Data tab - Text to columns, choose delimited, choose next, choose other, type - into the box, finish. It's faster than I could write either one of those formulas.
Click the * Add Reputation button in the lower left hand corner of this post to say thanks.
Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.
ok, then try this...
=IF(ISNUMBER(FIND("-",A2,1)),"-","")
I downloaded the sample file but I can't figure out what you're wanting to do with it.
Here's the data in the file:
Data Range
A B 1 Month Spilt dash here 2 Jan - sales is bad - 3 Febuary - what is happening? - 4 March - rainy - 5 April-ok - 6 May-where is the water - 7 June - yes!123 -
What are you wanting to do? What does "split dash here" mean?
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Kinda like my post #7
At the risk of hijacking this thread, do you know if there would be any efficiency difference between "ISNUMBER(FIND" and "COUNT(FIND(" ?
Let me do some quick testing...
Looks like ISNUMBER is slightly faster on large ranges:
Formula1 = ISNUMBER
Formula2 = COUNT
Data Range
A B C D E F G 2 Formula1 3 4 Rows Test1 Test2 Test3 Test4 Test5 Average 5 100 0.00156 0.00156 0.00158 0.00155 0.00156 0.001562 6 1000 0.00235 0.00237 0.00238 0.00115 0.00239 0.002128 7 8 9 Formula2 10 11 100 0.00153 0.00154 0.00157 0.00156 0.00155 0.00155 12 1000 0.00244 0.00264 0.0026 0.00127 0.00265 0.00232
cool, thanks for that
____
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks