Hi all
first post here, just started with VBA, not very good at it
The goal :
i have data like this :
Week HomeTeam Awayteam Helpcolumnhometeam Helpcolumnawayteam HelpHT-1 HelpAT-1
1 arsenal manchester arsenal1 manchester1 arsenal0 manchester0
2 tottenham arsenal tottenham2 arsenal2 tottenham1 arsenal1
3 arsenal chelsea arsenal3 chelsea3 arsenal2 chelsea2
-- I made 4 helpercolumns because concatenating in VBA is too difficult for me
what i try to do is the following
take week 3 : arsenal is playing home , i want to lookup the old arsenal rating in a range ai , so i need to check if arsenal2 exists either in column helpht-1 ( if their previous match was a home match) or helptat-1 if their previous match is an away match-- so these two columns are basically concatenate Week-1&"hometeam" (note sometimes teams havent played the week before so we need to check -2, but this is complexity i cannot even grasp right now --
if im able to find the column i start a vlookup either with starting range Helpht-1 or starting range helpAT-1
my current code is not giving the right results
i replaced the actual lookups with test values am not sure what the problem is but the running the code gives either a columns with all values "5" or all values "1000"
which shouldnt happen , per row it should check if the value is found in column AI , then execute the first lookup (replaced by value 5) or not then execute the other lookup (replaced by value 1000)
help GREATLY appreciated
Bookmarks