The file I will attach have two columns. The first column represents days and the second one has data that I would like to split into some columns to be more readable.
I have attached the final result
The file I will attach have two columns. The first column represents days and the second one has data that I would like to split into some columns to be more readable.
I have attached the final result
Something likePlease Login or Register to view this content.
Thanks a lot. I got error at this line
we can't do that to a merged cellPlease Login or Register to view this content.
If possible I wanted the same format (table) as attached
Try:
Please Login or Register to view this content.
You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
Practice makes perfect. I'm very far from perfect so I'm still practising.
Thanks a lot Mumps
That's near to what I wanted. The first row in result ends in 23 and there is still 1049 88329,40
Another things how to add totals and format the table?
The macro copies the data into the range E4:N34. You have formulas I columns O and P and in row 35 which give you the totals. Do you not want to use the formulas? What do you mean by "format the table"?
Get rid of the merged cells.we can't do that to a merged cell
You're sample file didn't have any.
@Mumps
When execute your code I found that The first row in result ends in 23 and there is still 1049 88329,40. Clear the columns from E to S and execute the code
@Fluff13 the sample file is what I am working on and the error says that there are merged cells although there are not merged cells
Try:
By the way, you have merged cells in row 2, columns E to P.Please Login or Register to view this content.
Did you delete your "Result table" first, including the merged cells?@Fluff13 the sample file is what I am working on and the error says that there are merged cells although there are not merged cells
Yes it worked now. How can I keep the original data in columns A & B the same untouched and get the results starting in column E for example?
I think that the macro I suggested in Post # 9 does exactly that.
Last edited by Mumps1; 06-15-2019 at 01:29 PM.
This will also do that & does some of the format.Please Login or Register to view this content.
This one is wonderful
Just wanted to add total row at the end of the table (in the example row 35) and as for columns that has the title "B" to be formatted as decimal numbers e.g 23.00
Thank you for this wonderful code
You're welcome & thanks for the feedback
Thank you very much
Just wanted to add total row at the end of the table (in the example row 35) and as for columns that has the title "B" to be formatted as decimal numbers e.g 23.00
Can you help me with this please?
If you record a macro of you changing the Formats & adding the total row, you can put that code at the end of the macro.
I am not so expert at that. I tried and tried but no use
What code did you get by using the recorder?
this what I got
I think this are too much and at the same time where I am going to put in the code?Please Login or Register to view this content.
What about formatting columns titled "B" to use separator 23.00
As a beginner starter according to the initial attachment :
PHP Code:
Sub Demo1b()
[E4:N34].ClearContents
Range("A4", Cells(Rows.Count, 2).End(xlUp)).Sort [A4], xlAscending, Header:=xlNo
Application.DisplayAlerts = False
[A4].CurrentRegion.Columns(2).TextToColumns [E4], xlDelimited, ConsecutiveDelimiter:=True, Space:=True, _
FieldInfo:=Array([{1,9}], [{2,9}], [{3,1}], [{4,1}], [{5,1}], _
[{6,1}], [{7,1}], [{8,1}], [{9,1}], [{10,1}], [{11,1}], [{12,1}], _
[{13,9}], [{14,9}]), DecimalSeparator:=","
Application.DisplayAlerts = True
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
Last edited by Marc L; 06-16-2019 at 12:32 PM. Reason: optimization …
I've slimmed the recorded code down & got thisPlease Login or Register to view this content.
Thanks a lot for all of you
I have used the last one of Fluff13. It is very wonderful
Glad to help & thanks for the feedback
I have this line to format the columns titled "B"
This works partially.. The zeros still the same 0 and I wanted the 0 to be 0.00Please Login or Register to view this content.
Just format the column to show 2 decimals.
Thanks a lot. That works fine.
You're welcome
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks