Hi, I'm a total beginner but have been trying to complete a project for work. Below is a description, any help would be appreciated.
I have a form that I want to automatically fill in from a macro searching through a range. In Range "Site" I have a drop down validation for picking the correct site. Once a value is in that field I'm looking for it to take that information and check it against another range called "SiteandRegion" then put that information into the form. Here is what I've come up with so far.
Sub auto_address()
Dim Town, County, Code As String
Let Town = WorksheetFunction.VLookup(Range("Site").Value, Range("SiteandRegion").Value, 3, False)
Let County = WorksheetFunction.VLookup(Range("Site").Value, Range("SiteandRegion").Value, 4, False)
Let Code = WorksheetFunction.VLookup(Range("Site").Value, Range("SiteandRegion").Value, 5, False)
End Sub
I think from what I've learned so far, that should collect the information? What I don't know is how to put that information into the cells. I've named the cells Town_1, County_1 and Code_1. Can anyone point me in the right direct plz.
Bookmarks