Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help Please Cut/Paste Macro for DVD Subtitles
Pock,
this will work if the cells with no time are actually blank, rather than having spaces in them or something. Watch out for the text wrap after the "If" statement. I've included a few lines at the end which will scroll back up and delete the entries with no time against them: if you want to use this just remove the comment marks, if not leave it as it is. Cheers, Pete Sub MatchTitles() Dim LastRow as integer, LastTime as integer, x as integer LastRow = ActiveSheet.UsedRange.Rows.Count LastTime = 2 For x = 2 to LastRow If Cells(x,1).value & Cells(x,2).value = "" Then Cells(LastTime,3).value = Cells(LastTime,3).Value_ & "<P" & Cells(x,3).value Else LastTime = x End If Next x 'For x = LastRow to 2 Step -1 'If cells(x,1)="" then ' rows(x).delete 'End if 'Next x End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding subtitles to chart title | New Users to Excel | |||
Cut and Paste Macro | Excel Discussion (Misc queries) | |||
how do i split subtitles in a single cell? | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |