First off; I'm sorry I dont have any example code since I'm unsure to how tackle this issue.
As per today I have a nice little code which imports data from a mastersheet to my input sheet. Though it will only work as long as the mastersheet is static.
I'm trying to match the product code in column A between my mastersheet and my workbook with a input sheet. And then copy the cell value in column D and E of the relevant row.
That's issue ONE.
The messy part is that some of the products are split into sub categories (less than :$$$:, between :$$$: etc) and they dont have any info in column A.
That's issue TWO.
I'm unsure if this is doable. Is it? And if I get permission to edit the mastersheet somewhat re: issue TWO, could a kind soul post some sample code for me to attack issue ONE with?
I tossed in the start of my currect static c/p, thought I don't think I'm keeping it if I get a handle on this match macro issue.
As per today I have a nice little code which imports data from a mastersheet to my input sheet. Though it will only work as long as the mastersheet is static.
I'm trying to match the product code in column A between my mastersheet and my workbook with a input sheet. And then copy the cell value in column D and E of the relevant row.
That's issue ONE.
The messy part is that some of the products are split into sub categories (less than :$$$:, between :$$$: etc) and they dont have any info in column A.
That's issue TWO.
I'm unsure if this is doable. Is it? And if I get permission to edit the mastersheet somewhat re: issue TWO, could a kind soul post some sample code for me to attack issue ONE with?
I tossed in the start of my currect static c/p, thought I don't think I'm keeping it if I get a handle on this match macro issue.
Code:
Dim ws As Worksheet, wb As Workbook, t As Date, wb1 As Workbook, wb2 As Workbook, wbName As String, janei As String, spm As String
Dim fil
Set wb1 = ActiveWorkbook
ChDir ""
fil = Application.GetOpenFilename
''
If fil = False Then
MsgBox "", vbExclamation, "."
Exit Sub
Else
spm = "?"
janei = MsgBox(spm, vbYesNo, "")
If janei = vbNo Then
Exit Sub
Else
End If
End If
Application.StatusBar = ""
t = Now()
Set wb2 = Workbooks.Open(fil)
wbName = ActiveWorkbook.Name
With wb2
.Sheets("important figures").Range("d14:e753").Copy
End With
With wb1
.Sheets("input").Range("d29").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
...