Solved

Creating a Loop to clear duplicate trades out of a Rec

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

730 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