Solved

Creating a Loop to clear duplicate trades out of a Rec

Posted on 2013-11-06
5
147 Views
Last Modified: 2013-11-13
Hi Guys, I need to create a Macro that can Loop down Column E find a Duplicate ID and cut and paste that line onto a different tab. The Duplicate ID must have a 0 or blank space in Column F so the correct ID is left behind. Below you see the column "FO MTM" has a blank space and  2 exact numbers in the "GBO ID" column, the 2nd row need to be cut and paste
to the Range ("P4").


Book      Currency      Trade ID                     GBO ID                   FO MTM                        GL MTM
GFALCOFRAM      GBP      6530805      3811642.28      315,443      315,443
GFALCOFRAM      GBP      6416721      3811642.28            315,443
0
Comment
Question by:Justincut
[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
  • 3
5 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 39627960
You seem to have lost the formatting.  Did you mean this?
Book      	Currency	Trade ID	GBO ID        	FO MTM	GL MTM
GFALCOFRAM	     GBP	 6530805	3811642.28	315,443	315,443
GFALCOFRAM	     GBP	 6416721	3811642.28		315,443

Open in new window


And is GBO column E?

Also, what is the significance of P4?  Can it ever be a different cell?  And since you want to paste a row into a cell, do you want the data merged or placed there starting at P4 and going to Q4, R4, etc or something else?
0
 
LVL 30

Expert Comment

by:gowflow
ID: 39627963
As you can see in the post of your question we cannot see what column is what !!! as data is not aligned.

Could you post a sample workbook that have your duplicates so we can build you a macro correctly.

what do you mean by

the 2nd row need to be cut and paste
to the Range ("P4").

You mean Col P I guess !!! as P4 is a cell !
gowflow
0
 
LVL 30

Expert Comment

by:gowflow
ID: 39627969
rspahitz
Wer' on the same track !!! :)
gowflow
0
 

Author Comment

by:Justincut
ID: 39630339
Hi, here's a text file I am talking about. Its a text file without any tabs so I suggested Range ("P4") as it was somewhere to cut and paste the Duplicates.
ALMBSRec-Daily-20131106-053136.txt
0
 
LVL 30

Accepted Solution

by:
gowflow earned 500 total points
ID: 39630587
Check out this file and let me know if it is correctly imported. If yes then pls do refer to the columns in Excel of what column need to be match with what column and then ... to be posted where

Tks/gowflow
ALMBSRec-Daily-20131106-053136.xlsx
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.
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.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

705 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