Solved

Cut and Paste Data

Posted on 2011-09-14
5
288 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
[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
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

635 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