Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2007

Tip: Looking for answers? Try searching our database.

Code for combining text and deleting row for c10 thru entire range

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DavidH56 - 08 Dec 2007 11:36 GMT
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.
Signature

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

Joel - 08 Dec 2007 15:14 GMT
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

> 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
[quoted text clipped - 12 lines]
>
> Thanks in advance.
DavidH56 - 08 Dec 2007 16:59 GMT
Thank you Joel.  Works great.
Signature

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

> Sub cobineRows()
>
[quoted text clipped - 27 lines]
> >
> > Thanks in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.