Solved

Cut and Paste Data

Posted on 2011-09-14
5
281 Views
Last Modified: 2012-06-21
Hi Experts,

I would like to request Experts help create a macro to cut and paste all data that were stars with "F00" at column B 1 cell up. E.g. Data at cell B56 need cut and paste it at cell C55. Same goes data at cell B79 moved to cell B78.

Hope Experts will help me create this feature. Attached the workbook for Experts perusal.
Cut-Copy-Data.xls
0
Comment
Question by:Cartillo
  • 2
  • 2
5 Comments
 
LVL 12

Assisted Solution

by:viralypatel
viralypatel earned 50 total points
ID: 36536509
A simple formula pasted in all cells of the column does the job. You dont need a macro. Check the changes in the attached files. Cut-Copy-Data.xls
0
 

Author Comment

by:Cartillo
ID: 36536931
Hi viralypatel,

Sorry if my question was not very clearly defined where should cut and paste the data. The data need to be pasted at the same column but 1 cell up. All other columns are actually with data, I simply remove it since it's not relevant to the question.  
0
 
LVL 10

Accepted Solution

by:
SANTABABY earned 450 total points
ID: 36537552
Please try the following macro:

Sub CutCopy()
Dim max As Long

max = Range("B65536").End(xlUp).Row

  For i = 1 To max
    If Left(Cells(i, 2).Value, 3) = "F00" Then
        Cells(i - 1, 3).Value = Cells(i, 2).Value
        Cells(i, 2).Clear
    End If
  Next i

End Sub

Open in new window

0
 
LVL 10

Expert Comment

by:SANTABABY
ID: 36537576
Correction:
Start the loop from second row:
For i = 2 To max

Open in new window


because, there is no destination cell(i.e. C0),  if B1 satisfies your criteria.
0
 

Author Closing Comment

by:Cartillo
ID: 36540119
Hi SANTABABY,
Thanks a lot for helping me.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

685 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