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
107 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This is about my first experience with programming Arduino.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

747 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

13 Experts available now in Live!

Get 1:1 Help Now