Solved

Creating a Loop to clear duplicate trades out of a Rec

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

758 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

22 Experts available now in Live!

Get 1:1 Help Now