Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2017, 04:53 AM
kadr_leyn kadr_leyn is offline Parse data in one column to 3 other columns Windows 7 32bit Parse data in one column to 3 other columns Office 2003
Novice
 
Join Date: Feb 2017
Posts: 1
kadr_leyn is on a distinguished road
Default

Data can be parsed to different worksheet according to cell value.

Watch and download example file :https://youtu.be/S-KUHWysAqk

Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long
If Target.Column = 8 Then
For i = 5 To Me.Cells(Rows.Count, 1).End(xlUp).Row
If Cells(i, "H").Value = "On hire" Then


Rows(i).Copy
Sheets("On_hire").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Rows(i).Delete
i = i - 1
ElseIf Cells(i, "H").Value = "Off hire" Then
Rows(i).Copy
Sheets("Off_hire").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Rows(i).Delete
i = i - 1
ElseIf Cells(i, "H").Value = "On sales" Then
Rows(i).Copy
Sheets("On_sales").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Rows(i).Delete
i = i - 1
End If
Next i
End If
End Sub
Reply With Quote
Reply

Tags
parse data, text to columns



Similar Threads
Thread Thread Starter Forum Replies Last Post
Documents with two columns only have one column after update Nomis69 Word 5 04-05-2016 02:29 PM
Parse data in one column to 3 other columns Need code to Parse and arrange data based on heading winmaxservices2 Excel Programming 1 01-01-2015 01:04 AM
Split one column to several columns moishy Excel Programming 1 02-01-2013 12:50 AM
Columns. How to move the left column so it's to the right of the 'right' column ? Vit Word 9 11-21-2012 12:57 PM
Parse data in one column to 3 other columns How to expand one column into two columns? Jamal NUMAN Excel 1 01-12-2011 07:59 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft