Hi there,
I was wondering if there was a VLOOKUP in VBA that I could use? I'm fairly new to VBA so please bear with me. I'll quickly explain what I want to do, just to put you in context. I have two files, a source file and a destination file. The source file has account#'s and data associated to them. The destination file also has account#'s (maybe even some that are in the source file). I want to take a row in the source file, take the first cell (which is the unique account #) and see if this account# exists in the destination file. If it does, add (mathematically) the numbers in other columns in the source to the destination. If it doesn't, simple append the entire row. I know how to append the row, I just don't know how to lookup then add into columns. I also know that there is a function in excel called VLookup than can do this, but I can't find this in VBA. Any help would be greatly appreciated. Thanks in advance.
Nikohl
I was wondering if there was a VLOOKUP in VBA that I could use? I'm fairly new to VBA so please bear with me. I'll quickly explain what I want to do, just to put you in context. I have two files, a source file and a destination file. The source file has account#'s and data associated to them. The destination file also has account#'s (maybe even some that are in the source file). I want to take a row in the source file, take the first cell (which is the unique account #) and see if this account# exists in the destination file. If it does, add (mathematically) the numbers in other columns in the source to the destination. If it doesn't, simple append the entire row. I know how to append the row, I just don't know how to lookup then add into columns. I also know that there is a function in excel called VLookup than can do this, but I can't find this in VBA. Any help would be greatly appreciated. Thanks in advance.
Nikohl