Report

Macro for Copying group of cells and paste as row

Ask a question vaimrankhan 4Posts Wednesday November 8, 2017Registration date November 15, 2017 Last seen - Last answered on Nov 15, 2017 at 12:38 AM by vaimrankhan
Hi,

I need some help i need a Macro Code to arrange certain cells and prepare it as a row.

I export the file from SharePoint in Excel Format. The data of the form is in Linear.
The data comes in one row. However I need to transpose and get the Set of Cells in Row By Row.

For Example: J1:R9 is one set then S1:AA1 must come below. Its a pattern of 9 Fields.

Please help.
Helpful
+0
plus moins
OK, Is the file always named the same? If not, then copy it locally, and name it SHAREPOINTINPUT.

Now, open up a new workbook, and click on Data>import from text.

When it asks how is the file formatted, select "SET FIELD LENGTHS". In th enext screen set up the string with 9 character delimiters. Save it.

Now, work the data. Save it as something else.

Now, when you get a new file, name it the same, place it in th esame directory, open up the workbook, and hit F9 (refresh data).

Post back if you have different specifications (I expect the scope will expand!)

Have fun!

vaimrankhan 4Posts Wednesday November 8, 2017Registration date November 15, 2017 Last seen - Nov 8, 2017 at 11:59 PM
Hi Mark,

Thanks for replying. I am new to Macros. However let me share how exactly my data is.

Staff Name|Company|Designation|In Date|In Time|Out Date|Out Time|Staff Name|Company|Designation|In Date|In Time|Out Date|Out Time and so on.

Output i want is in another sheet.
Staff Name|Company|Designation|In Date|In Time|Out Date|Out Time
Imran Khan|Company|Designation|Date |07:00 |Date |15:30pm
Imran Khan|Company|Designation|Date |07:00 |Date |15:30pm
Imran Khan|Company|Designation|Date |07:00 |Date |15:30pm
Reply
Leave a comment
Helpful
+0
plus moins
So did you try the import?
vaimrankhan 4Posts Wednesday November 8, 2017Registration date November 15, 2017 Last seen - Nov 11, 2017 at 11:34 PM
I did not understand.
Reply
ac3mark 8222Posts Monday June 3, 2013Registration date ModeratorStatus November 13, 2017 Last seen - Nov 13, 2017 at 04:37 PM
DId you attempt the "IMPORT" instruction as I stated?
Reply
vaimrankhan 4Posts Wednesday November 8, 2017Registration date November 15, 2017 Last seen - Nov 15, 2017 at 12:38 AM
Sorry, I tried doing as you had instructed. However, i would like to repeat myself.

InfoPath form is saved in Share Point > I Export the data from SharePoint > Then My The Extracted data is as below.
Staff Name|Company|Designation|In Date|In Time|Out Date|Out Time|Staff Name|Company|Designation|In Date|In Time|Out Date|Out Time
Imran Khan|Company|Designation|Date |07:00 |Date |15:30pmImran Khan|Company|Designation|Date |07:00 |Date |15:30pm

Output i want to use Macro and get is as below.

Staff Name|Company|Designation|In Date|In Time|Out Date|Out Time
Imran Khan|Company|Designation|Date |07:00 |Date |15:30pm
Imran Khan|Company|Designation|Date |07:00 |Date |15:30pm

Note: I do not have delimiters in the exported data, all the data is in linear format.
Reply
Leave a comment

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!