vba - Add +1 to cell in same row but different column from Vlooked-up item -
i'm quite new vba apologise in advance coding mistakes ;)
what i'd code is:
- take caption label on form
- lookup alphanumerical caption on workbook’s sheet
add +1 number on same row of vlook part on different column.
private sub submitbutton_click() 'declaring variables used vlookup on top level part number list dim passpartno1form string dim passpartno1workbook string dim failpartno1workbook string dim rowpass1 integer sheets("sheet5").activate 'if pass checkbox selected if pass1.value = true 'assign variable passpartno1form caption of partnumber1 label passpartno1form = partnumber1.caption 'look risk score in top level list passpartno1workbook = application.worksheetfunction.vlookup(passpartno1form, range("toplevellist"), 3, false) 'this should define row of code has been v looked rowpass1 = passpartno1workbook.row 'add +1 number in column 3, , row same part has been v looked cells(rowpass1, 3).value = cells(2, 3).value + 1 end if end sub
i’ve been trying head round ages “invalid qualifier” error. suggestion appreciated, thanks!
your passpartno1workbook dim'ed string; cannot take .row it. assume want row @ value vlookup function found? in case need .match function.
Comments
Post a Comment