Guys-This is racking my brain.
I've created a variable as a string. I need to use this data to be past into another cell into another worksheet: Please advise:
Dim vOurResult As String
Dim myportfolio1 As String
Dim Found As Boolean
myportfolio = Sheets("Trade Breakdown").Range("A9").Text
If WorksheetFunction.CountIf(Sheets("MO Trade List").Range("A2:A15"), "TCPAM Investments (Cayman) Limited - Class F Fund") > 0 Then
With Sheets("MO Trade List").Range("A2:A15")
Found_Data = 0
Found = False
vOurResult = .Find(What:="TCPAM Investments (Cayman) Limited - MENA Equity Fund", AFTER:=.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Offset(0, 3)
vOurResult1 = .Find(What:="TCPAM Investments (Cayman) Limited - MENA Equity Fund", AFTER:=.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Offset(0, 9)
vOurResult2 = .Find(What:="TCPAM Investments (Cayman) Limited - MENA Equity Fund", AFTER:=.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Offset(0, 11)
End With
MsgBox Portfolio & myportfolio1 & vbNewLine & "Fund" & vOurResult & vbNewLine & "Shares" & vOurResult1 & vbNewLine & "USD Amount" & vOurResult2
End If
.......Here is selecting the data from the variable and pasting it into the named cell....
Sheets("Trade Breakdown").Activate
Range("A11").Select
If vOurResult = "" Then
MsgBox "Found"
Thanks in advance,
JediJim
I've created a variable as a string. I need to use this data to be past into another cell into another worksheet: Please advise:
Dim vOurResult As String
Dim myportfolio1 As String
Dim Found As Boolean
myportfolio = Sheets("Trade Breakdown").Range("A9").Text
If WorksheetFunction.CountIf(Sheets("MO Trade List").Range("A2:A15"), "TCPAM Investments (Cayman) Limited - Class F Fund") > 0 Then
With Sheets("MO Trade List").Range("A2:A15")
Found_Data = 0
Found = False
vOurResult = .Find(What:="TCPAM Investments (Cayman) Limited - MENA Equity Fund", AFTER:=.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Offset(0, 3)
vOurResult1 = .Find(What:="TCPAM Investments (Cayman) Limited - MENA Equity Fund", AFTER:=.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Offset(0, 9)
vOurResult2 = .Find(What:="TCPAM Investments (Cayman) Limited - MENA Equity Fund", AFTER:=.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Offset(0, 11)
End With
MsgBox Portfolio & myportfolio1 & vbNewLine & "Fund" & vOurResult & vbNewLine & "Shares" & vOurResult1 & vbNewLine & "USD Amount" & vOurResult2
End If
.......Here is selecting the data from the variable and pasting it into the named cell....
Sheets("Trade Breakdown").Activate
Range("A11").Select
If vOurResult = "" Then
MsgBox "Found"
Thanks in advance,
JediJim