Hi
I'm completely new to VBA programming.
Here is my problem:
I need to be able to sort in a lot of reports. I sort by name and date, which is input by the user.
So for example the user marks a name from a dropdown list that matches the reports name. Then the user inputs all the dates wanted in the first column. Then to the right of this column all the relevant data is extracted.
Hope this makes sense. So far I'm able to extract a single value from a report and now I'm trying to loop through each input date.
Dim ADAV As Range, i As Integer
Dat = 0
For i = 6 To 10 'I just choosed some range to see if it would work
Dat = Cells(i, 1) 'This reads the different dates
Nam = Cells(1, 5) 'This reads the name of the report, which doesn't change over time
s = "='F:\VESS\[DDATO.xls]Ark1'!E$13" 'The reports placement
s = Replace(s, "VESS", Nam)
s = Replace(s, "DATO", Dat) 'Replacing in the string
For j = 6 To 10
Cells(j + 1, 2).Formula = s 'Not working, but I want to get the data from the file out in the corresponding cells, next to the date assigned
Next j
Next i
I hope this makes sense to you. Furthermore i apologize for my bad coding, but I'm am just breaking into it.
Bookmarks