G
Guest
Hi, I don't have any idea of the correct syntax of what I am trying to do but
here it is. On a userform (named search) a person selects a name from a drop
down and hits submit. The idea is to have code in the submit button that
takes that value and does a lookup on it comparing it to data in a sheet. I
don't know how many items will be on the sheet but they could be entered in
column a row 3 to 1000. I do have the code in the macro to sort the items so
a lookup would work. The look uped value should then populate a text box in
another userform. This is what I think i am trying should look like but since
it doesn't work I know that my syntax is probably way off. Can anyone help?
UserFormview.V1.Value =
LOOKUP((UserFormSearch.S1.Value),Sheets("Data").Cells(3,
19:1000,19),Sheets("Data").Cells(3, 1:1000,1))
here it is. On a userform (named search) a person selects a name from a drop
down and hits submit. The idea is to have code in the submit button that
takes that value and does a lookup on it comparing it to data in a sheet. I
don't know how many items will be on the sheet but they could be entered in
column a row 3 to 1000. I do have the code in the macro to sort the items so
a lookup would work. The look uped value should then populate a text box in
another userform. This is what I think i am trying should look like but since
it doesn't work I know that my syntax is probably way off. Can anyone help?
UserFormview.V1.Value =
LOOKUP((UserFormSearch.S1.Value),Sheets("Data").Cells(3,
19:1000,19),Sheets("Data").Cells(3, 1:1000,1))