Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Code for combining text and deleting row for c10 thru entire range

Excel 2003, I am trying to format a CSV file which has data separated into 2
different rows. I would like to look where column a is null (no text) and
column c has text and where column b from the previous row begins with "38"

for example

10 A B C
D
11 Harris 38bqw Open Window and apply Complete
12 adhesive to edges


I would like add c12 to the end of c11, delete c12 and loop same for entire
range on sheet. Range is usually not more than 1000 rows.

Thanks in advance.
--
By persisting in your path, though you forfeit the little, you gain the
great.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Code for combining text and deleting row for c10 thru entire range

Sub cobineRows()

RowCount = 1
Do While Range("C" & RowCount) < ""
If Range("A" & (RowCount + 1)) = "" And _
Range("C" & (RowCount + 1)) < "" Then

Range("C" & RowCount) = _
Range("C" & RowCount) & _
Range("C" & (RowCount + 1))
Rows(RowCount + 1).Delete
End If
RowCount = RowCount + 1
Loop

"DavidH56" wrote:

Excel 2003, I am trying to format a CSV file which has data separated into 2
different rows. I would like to look where column a is null (no text) and
column c has text and where column b from the previous row begins with "38"

for example

10 A B C
D
11 Harris 38bqw Open Window and apply Complete
12 adhesive to edges


I would like add c12 to the end of c11, delete c12 and loop same for entire
range on sheet. Range is usually not more than 1000 rows.

Thanks in advance.
--
By persisting in your path, though you forfeit the little, you gain the
great.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Code for combining text and deleting row for c10 thru entire r

Thank you Joel. Works great.
--
By persisting in your path, though you forfeit the little, you gain the
great.



"Joel" wrote:

Sub cobineRows()

RowCount = 1
Do While Range("C" & RowCount) < ""
If Range("A" & (RowCount + 1)) = "" And _
Range("C" & (RowCount + 1)) < "" Then

Range("C" & RowCount) = _
Range("C" & RowCount) & _
Range("C" & (RowCount + 1))
Rows(RowCount + 1).Delete
End If
RowCount = RowCount + 1
Loop

"DavidH56" wrote:

Excel 2003, I am trying to format a CSV file which has data separated into 2
different rows. I would like to look where column a is null (no text) and
column c has text and where column b from the previous row begins with "38"

for example

10 A B C
D
11 Harris 38bqw Open Window and apply Complete
12 adhesive to edges


I would like add c12 to the end of c11, delete c12 and loop same for entire
range on sheet. Range is usually not more than 1000 rows.

Thanks in advance.
--
By persisting in your path, though you forfeit the little, you gain the
great.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining Text from 2 Columns into 1 then Deleting the 2 Columns sleepindogg Excel Worksheet Functions 5 September 19th 08 12:36 AM
Combining Cell Contents - entire columns SV Excel Worksheet Functions 7 December 11th 06 11:30 PM
Code for deleting entire row gregork Excel Programming 2 July 4th 04 12:13 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Excel Programming 1 April 15th 04 08:34 PM
Ideal Code deleting rows/based on bold text Samm Excel Programming 1 April 9th 04 03:20 AM


All times are GMT +1. The time now is 04:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"