• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Split the data into Different Format

Abhijeet

Active Member
Hi

I have In Column A has Text Lines from that i want Split the Date & Numbers of hrs Element wise
Sat Enh Sun Enh Night Enh Unsocial Enh Bank Holiday Enh Rest Day Enh

Then Date in Earned Date column & Assignment in Column B these i want in Column D

All these are mention in Excel file
 

Attachments

  • Macro to make.xls
    40.5 KB · Views: 6

Hi,

'cause we are in year 2015, you must put the year reference
somewhere in the worksheet.

Without columns exact text match with source column,
will be difficult, maybe a gas factory code !
You must amend worksheet accordingly …

Use VBA function Split to separate data.

'cause you reach more than 500 posts and you never seems to do
any effort to start a code or to just share a logic (algorithm) to achieve
your needs, think about commercial services …​
 
Last edited:

So it's a duplicate thread ‼ :eek:

You already had a code when you started this thread ! :mad:

Just follow forum rules and keep on original thread
and don't waste with him your chance to be followed by a ninja ! :rolleyes:

Kowabunga ! (turtle cry !) :DD
 

'cause I don't like to waste time to write a gas factory code from
a bad structure worksheet as well as you already have a code
that you just have to try to amend, it's up to you !

____________________________________________________
Je suis Charlie
 
'cause we are in year 2015, you must put the year reference
somewhere in the worksheet.

Without columns exact text match with source column,
will be difficult, maybe a gas factory code !
You must amend worksheet accordingly …

Use VBA function Split to separate data.
Errors in expected results table, entry errors, …
So start to correct worksheet …

Easy to separate data with VBA Split function, just try !
 

Previous post amended : entry errors (spaces in date, comma) …

But the main issue is the expected result columns titles and source data.

So we are expecting your thinking of the way to solve your need :
even if you don't know VBA (with more than 500 posts ! :rolleyes:)
you can burn a couple of neurons and post your algorithm to achieve it …
 
Can any One help me for this problem

As Marc L has pointed out maybe you should, for once, try helping your self before multi posting the same question dressed in different cloths.

Marc L has given his time and pointed you in the right direction, but still you want others to do the work for you.

You rely on others to do nearly all the work for you and this is a practise you have adopted since you joined the forum.

I am new in VBA so can u please give me macro for this file Data

It has been pointed out to you before, by ninjas that you would get far more help if you showed you had tried to help yourself. This you do not do.

Post #7
Can any One help me for this problem

Just posting asking if there is any help is Bumping your question up the list and shoving those who are quietly waiting for help down the forum list...Bad manners and frowned upon.


.
 
Hi Mark L
I am new in VBA so can u please give me macro for this file Data
http://forum.chandoo.org/threads/split-the-data-into-different-format.21481/
:DD

Begin your code and post only a question upon a precise technical point.

Use Split function and for example for a beginner
see Select Case statement to point out an expected column …

Other way : use new columns in the source data
to enter the expected columns …

Think, make choice and try, very beginner level, any noob can do it …

Otherwise if you don't want to burn any neuron, any effort as usual,
you should afford commercial services !
 
Hi

I tried with Use Split function and for example for a beginner
see Select Case statement to point out an expected column … but i am unable to do this can u please help me
 


So post your code and explain the technical point
and present your analyse …

_________________________________________
Je suis Charlie

 
Sub test()
Dim txt As String
Dim i As Integer
Dim FullName As Variant

txt = ActiveCell.Value
FullName = Split(txt, " ")

For i = 0 To UBound(FullName)
Cells(1, i + 2).Value = FullName(i)

Next i

End Sub
 
I am doing this but what is my expected result i can not pull the data in that format can u please tell me
Sub test()
Dim txt As String
Dim i As Integer
Dim FullName As Variant

txt = ActiveCell.Value
FullName = Split(txt, " ")

For i = 0 To UBound(FullName)
Cells(1, i + 2).Value = FullName(i)

Next i

End Sub
 
Mark L what ever i can do it i mention i can not do this pull data in Expected format If u can help me then i can learn
 

It's just visual and logical !

Even if you don't know how to code in VBA,
it's easy to explain the way to go if you ever think about it …
 
Yes Mark L
I agree with u my logic is search Sat ect this types of word from string then pull Numbers from left of that word but i am enable to do this can u please tell me
 

What an explanation ‼​
  • « from string » : which ?
  • « pull Numbers » : where ? In outer space !
  • « from left of that word » : it's another word !
Without a real analyse …
 
Back
Top