Wildernapalm
New Member
- Joined
- Jun 23, 2022
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Hey everybody! I've been scouring these boards all week and have seen a pretty kind community.
I'll be frank, I'm applying for a job and I have an assessment they want me to complete to the best of my abilities. It was expressly stated I could use whatever resources I could get my hands on and I feel like now's the time!
What I've Roughly been asked to do is create a button on a sheet, the button will open an InputBox that can be used to search against a table on a separate sheet and do a very specific VLookup that results in a MsgBox displaying said VLookup results of multiple non-sequential columns.
I'd share the exact wording but I feel it might out the company and its hiring practices and that seems unprofessional.
If anyone can help rebuild my code or at least tell me how to better explain myself I'd love to learn! VBA feels **** rewarding when you get something right!
-Matt
I'll be frank, I'm applying for a job and I have an assessment they want me to complete to the best of my abilities. It was expressly stated I could use whatever resources I could get my hands on and I feel like now's the time!
What I've Roughly been asked to do is create a button on a sheet, the button will open an InputBox that can be used to search against a table on a separate sheet and do a very specific VLookup that results in a MsgBox displaying said VLookup results of multiple non-sequential columns.
I'd share the exact wording but I feel it might out the company and its hiring practices and that seems unprofessional.
VBA Code:
Sub InputBox()
Dim b As String
Dim c As String
Dim e As String
Dim h As Currency
Dim j As Long
Dim m As Currency
Dim n As Currency
Dim o As Currency
Dim i As Integer
Dim lngLastRow As Range
Set lngLastRow = Worksheets("2. Formatting").Range("B7:R17")
c = Application.InputBox("Select An Engagement")
For i = 8 To 17
If Cells(i, 1).Value Like "*c*" Then
e = Cells(i, 2).Value
h = Cells(i, 6).Value
j = Cells(i, 7).Value
m = Cells(i, 10).Value
n = Cells(i, 11).Value
o = Cells(i, 12).Value
b = Cells(i, -1).Value
End If
Next i
MsgBox " Engagement Name: " & c & " Engagement Partner: " & e & " Client Name: " & b & " Total Expense: " & h & " Charged Hours: " & j & " TER: " & m & " NER: " & n & " SER: " & o, , ("Results")
End Sub
If anyone can help rebuild my code or at least tell me how to better explain myself I'd love to learn! VBA feels **** rewarding when you get something right!
-Matt