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
Solved

Creating a Loop to clear duplicate trades out of a Rec

Posted on 2013-11-06
5
145 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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;…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

829 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