Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

find and move cell

Posted on 2014-03-28
2
Medium Priority
?
268 Views
Last Modified: 2014-03-31
Can an expert help me out with this please.

This is a CSV file with the data in Column A. When I find Grp1 I want to move that row to column B

AMXXX0002 (111) CHTY      HTWW-AMPHLETT SCHLR(WXXX)
Grp1       5860.0000           0.00           0.00       0.00                         0.00         666.90

So if
AMXXX0002 (111) CHTY      HTWW-AMPHLETT SCHLR(WXXX)
is in A3

and Grp1       5860.0000           0.00           0.00       0.00                         0.00         666.90
is in A4 , move
Grp1       5860.0000           0.00           0.00       0.00                         0.00         666.90

to B3

Thanks
0
Comment
Question by:Jagwarman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
Harry Lee earned 2000 total points
ID: 39962056
Jagwarman,

You can use this vba to do it.

Sub FormatCSVReportv1()
Dim I As Long, LastRW As Long


LastRW = Cells(Rows.Count, 1).End(xlUp).Row
For I = 1 To LastRW
    If Cells(I, 1) Like "*Grp1*" Then
        Cells(I - 1, 2) = Cells(I, 1)
    End If
Next

For I = LastRW To 1 Step -1
    If Cells(I, 1) Like "*Grp1*" Then
        Cells(I, 1).EntireRow.Delete Shift = UP
    End If
Next
End Sub

Open in new window

0
 
LVL 46

Expert Comment

by:aikimark
ID: 39962116
please post an example workbook with the before and after state of row data you are describing.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question