Solved

How to Loop a column to find a company name, take its Drawn Value and copy and paste to another tab

Posted on 2014-11-11
3
115 Views
Last Modified: 2014-11-19
Hi Guys, if you look at the attachment,in the "WTD commentary" tab, I have to populate column E with the "Drawn" balance of the companies in column B from the other tab "Daily GSFI PL" but in the column I. How can I create a Loop to do this in VBA code where it Loops down Column B from the tab "Daily GSFI PL, takes the data 8 columns along, copies and pastes it to the appropriate company in the WTD commentary tab and populates Column E "the Market Value" column?

Justin
Book3.xls
0
Comment
Question by:Justincut
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
Haris Djulic earned 500 total points
ID: 40436125
See attached file
Book3.xls
0
 

Author Comment

by:Justincut
ID: 40436222
I know how to use a Vlookup. The other tab is on another Excel File which I only get by opening an e-mail attachment, and I activate by using this Function:
Sub SelectMatchingWindow(MatchingFilename As String)

Dim NumberOfWindows As Integer
Dim Count1 As Integer
Dim MatchedWindowNumber As Integer
Dim WindowName As String

NumberOfWindows = Windows.Count

For Count1 = 1 To NumberOfWindows

    WindowName = Windows(Count1).Caption
   
    If InStr(WindowName, MatchingFilename) = 1 Then
        MatchedWindowNumber = Count1
    End If

Next Count1

If MatchedWindowNumber > 0 Then
    Windows(MatchedWindowNumber).Activate
End If



End Sub

Any ideas?
0
 

Author Comment

by:Justincut
ID: 40452941
I've requested that this question be deleted for the following reason:

Noone is answering the question
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

830 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