I am using excel 2021 version. Unable to apply Xlookup in vba. I have employee id against which I want to get name for the female employees only. I have two columns. Employee name(column 1) and Sex(column 2). I am guessing what could be the vba code to get female employee names only.
I tried to apply vba code :
resultstttt = Application.WorksheetFunction.XLookup(Sheets(“14_MW”).Cells(hi, 1).Value, Workbooks(Fname).Sheets(“Dec’2023”).Range(q & 5 & “:” & q & lirow), Workbooks(Fname).Sheets(“Dec’2023”).Range(qt & 5 & “:” & qt & lirow) * Workbooks(Fname).Sheets(“Dec’2023”).Range(qw & 5 & “:” & qw & lirow) = Workbooks(Fname).Sheets(“Dec’2023”).Range(qw & 13).Value)
q stands for employee number column, qt stands for Name of the employee, qw stands for Sex.
Harish Pandey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.