Solved

Creating a Loop to clear duplicate trades out of a Rec

Posted on 2013-11-06
5
143 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
  • 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 29

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 29

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 29

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
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…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now