conditional append data

onenessboy

New Member
Joined
Feb 7, 2018
Messages
2
Hi experts,

I have a excel file with two columns like below:
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 272"]
<tbody>[TR]
[TD="class: xl65, width: 272"]ep_expired_access[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 580"]
<tbody>[TR]
[TD="class: xl65, width: 580"]Number of times an item was expired on[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]application access.[/TD]
[/TR]
[TR]
[TD]ep_expired_compactor[/TD]
[TD]Number of times an item was expired by[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]the ep engine compactor[/TD]
[/TR]
[TR]
[TD]ep_expired_pager[/TD]
[TD]Number of times an item was expired by ep engine item pager[/TD]
[/TR]
[TR]
[TD]ep_item_flush_expired[/TD]
[TD]Number of times an item is not flushed,due to the expiry of the item[/TD]
[/TR]
[TR]
[TD][TABLE="width: 272"]
<tbody>[TR]
[TD="class: xl65, width: 272"]ep_queue_size[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Number of items queued for storage[/TD]
[/TR]
</tbody>[/TABLE]

I need to append extra row value appended something like this

[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 272"]
<tbody>[TR]
[TD="class: xl65, width: 272"]ep_expired_access[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 580"]
<tbody>[TR]
[TD="class: xl65, width: 580"]Number of times an item was expired on application access.[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]ep_expired_compactor[/TD]
[TD]Number of times an item was expired by the ep engine compactor[/TD]
[/TR]
[TR]
[TD]ep_expired_pager[/TD]
[TD]Number of times an item was expired by ep engine item pager[/TD]
[/TR]
[TR]
[TD]ep_item_flush_expired[/TD]
[TD]Number of times an item is not flushed,due to the expiry of the item[/TD]
[/TR]
[TR]
[TD][TABLE="width: 272"]
<tbody>[TR]
[TD="class: xl65, width: 272"]ep_queue_size[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Number of items queued for storage[/TD]
[/TR]
</tbody>[/TABLE]

Can you please help

Regards
ASP

****** id="cke_pastebin" style="position: absolute; top: 283.2px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 500"]
<tbody>[TR]
[TD]ep_expired_pager

[/TD]
[/TR]
</tbody>[/TABLE]
</body>
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the Board!

Assuming that your data is in columns A and B, try this:
Code:
Sub MyCombine()

    Dim lRow As Long
    Dim r As Long
    
    Application.ScreenUpdating = False
    
'   Find last row in column B with data
    lRow = Cells(Rows.Count, "B").End(xlUp).Row
    
'   Loop through all rows starting from bottom and moving up
    For r = lRow To 2 Step -1
'       Check to see if column A is blank
        If Cells(r, "A") = "" Then
'           Combine with row B above
            Cells(r - 1, "B") = Cells(r - 1, "B") & " " & Cells(r, "B")
'           Delete current row
            Rows(r).Delete
        End If
    Next r
    
    Application.ScreenUpdating = True
        
End Sub
 
Upvote 0
You are welcome!
Glad I was able to help. :)
 
Upvote 0

Forum statistics

Threads
1,223,671
Messages
6,173,737
Members
452,533
Latest member
Alex19k

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