I can't for the life of me figure out how to adjust my code to offset the location of where the answer to my second input box question goes. How my macro is supposed to work. . . if A4 (for example) is my active cell and where the macro starts, that's where I want the answer to the very first question to go. Then, when the second question is asked I want that answer to go to in column c of the same row. After the two questions are asked, I want to populate information for the next row (columns a and c again). When I'm done entering information I just hit enter and the macro stops.
However, what happens is that the answers to the questions only post to the first column no matter what I change the "r" values to.
What happens:
What I'm trying to accomplish:
For the description, I've got that covered with a vlookup formula so that doesn't need to be addressed in the code at all.
Thank you in advance for your time : )
However, what happens is that the answers to the questions only post to the first column no matter what I change the "r" values to.
VBA Code:
Sub infoEntry()
Set c = ActiveCell
For r = 0 To 1
For s = 0 To 4
val1 = InputBox("Enter item 1:", "Quantity?")
If val1 = "" Then
Exit Sub
Else
c.Offset(s, r).Value = val1
End If
Next s
Next r
End Sub
What happens:
What I'm trying to accomplish:
For the description, I've got that covered with a vlookup formula so that doesn't need to be addressed in the code at all.
Thank you in advance for your time : )