Copy or split cell value up to a certain word in the cell.

KateD

New Member
Joined
Sep 15, 2021
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
Hello,
I have spent a lot of time museing over my problem and i have looked at a number of questions which are similar to mine. However, none have answered it and I do wonder if I am going about this the wrong way.
I am a teacher and I use google agenda to plan my lessons. Once the course is complete i create a report of my agenda using GTimeReport. it looks like this ( What i want to achieve is to use this form as mail merge data to import what i have written to a specific word doc we have to use.)
1635327581738.png
column K is what i am struggling with. each text you see in K needs to be a column header. The text that would be below each of these is where i write my details, and these details would be therefore under each column header.
I have so far merged the cells into one, thinking i could then split the cells when it arrives at each "header" and then take this data into a new column.

1. I cant find a code ( or create one) that will do this
2. move this data into a column. ( i think i could do this once the data is split)
3. is this even the right way to go ????????

thankyou in advance for your help.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi KatD, This should be a very simple thing to do. However, merging into one cell is the wrong way. (You can do it that way, but it is a more difficult route).
A simple way is to copy the column K (not merged) and then paste it transposed (that is one of the options when pasting). You would then have all the headings, but with blank columns between, which you could remove.

Another way is to load column K into an array, using vba, and then in vba copy each cell of the array that is not empty into an output array and drop this into the sheet, voila your headers are there.

I can help you with these macros if you wish.
 
Upvote 0
Sorry it gas taken a while to respond. Thank you for the feedback. I will have a try at what you have suggested and will come back if I need any help.
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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