Hello
i`m trying to find the column number in sheets "STATESTIK" to use as a variable B
the value in "RESULTAT" "B2" is today date
the dates 01.01.2010, 01.02.2010, 01.03..... is in sheets "STATESTIK" row "5"
at the først day in a month i want to copy the value in sheets "RÅDATA" "D2" to "STATESTIK" (A, B)
if i define the variable B = f.ex 5 it works
how can tell vba to retun the column number of f.ex 01.01.2010 in sheets "SATESTIK" ROW "5"
a = Application.Match(Sheets("RÅDATA").Range("H2"), Sheets("STATESTIK").Range("A1:A54"), 0) B = Application.Index(Sheets("RESULTAT").Range("B2"), Sheets("STATESTIK").Rows("1:30"), 0) Sheets("RÅDATA").Range("D2").Copy Sheets("STATESTIK").Cells(a, B).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False End Sub
Last edited by Paul; 11-18-2010 at 05:10 PM. Reason: Added code tags for user, please do so yourself in the future.
can somone please help ?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks