VB Script help

Log in to stop seeing adverts

Status
Not open for further replies.

Joe_Fox

Well-Known Member
Hope someone can help me here.

I need to write a bit of vb and don't know where to start really.
What I need to do is as follows:

I have a cell the has text on several rows within the cell, each row has been created using the ALT+Enter method of creating a carriage return.

So, in for example cell A5 the data is as follows:


ABCDE
1Red
Blue
Yellow
Green

What I want the vb script to do is take each 'row' within the cell, and paste them to A6, A7, A8 (leaving 'Red' in cell A5) - a bit like using the 'Text to Columns' function but using the carriage return as the delimiter.

The result should be:


ABCDEFGH
1RedBlueYellowGreen


I tried using ALT+20 (carriage return I think) as the delimiter but couldn't get it to work.

Hope one (or two, or three!) of you can help me out here.

Cheers,
Joe
 
Steven, I have looked at many many pages on this and none have provided me with a result.
Trust me - I wouldn't come here asking this sort of question without googling around first.

Hope someone can help still.
Joe_Fox
 
Status
Not open for further replies.
Log in to stop seeing adverts

Championship

P Pld Pts
1Leicester4697
2Ipswich4696
3Leeds Utd4690
4Southampton4687
5West Brom4675
6Norwich City4673
7Hull City4670
8Middlesbro4669
9Coventry City4664
10Preston 4663
11Bristol City4662
12Cardiff City4662
13Millwall4659
14Swansea City4657
15Watford4656
16Sunderland4656
17Stoke City4656
18QPR4656
19Blackburn 4653
20Sheffield W4653
21Plymouth 4651
22Birmingham4650
23Huddersfield4645
24Rotherham Utd4627
Top