C
CompleteNewb
Greetings VBA experts.
After a couple hours of attempts, I've gotten close but have no cigar.
I'm trying to make it so that a user enters a value (text) in a particular
cell (let's say F3), then clicks one of two buttons (a PLUS button or MINUS
button) a certain number of times. Each click adds 1 (clicking 5 times = 5,
clicking 7 times = 7, etc.), and, depending on which button it is, the
number of clicks is either added to or subtracted from the current value in
the cell 3 columns to the right of the cell that contains the value in F3.
Examples:
Column A has text values all the way down. Cell A24 has "truck" in it.
User enters "truck" in F3, then clicks the PLUS button 5 times. Each click
adds 1 to the number in cell D24. So if D24's value is 12 before user
clicks the PLUS button for the first time, it has 13 when user clicks once,
14 when user clicks twice, etc.
Let's say cell A46 has "drag". User enters "drag" in F3, then clicks the
MINUS button 7 times. If D46 had 30 before user started clicking the MINUS
button, it has 29 the first click, 28 the second click, etc., and the final
value whne user is done is 23.
Now, I can use any number of methods that might be easier. For instance,
the value doesn't have to be incremented each click, the variable of click
counting can just add up the clicks, and then when the user hits "Enter" on
the keyboard, the total number of clicks is added or subtracted from the
correct cell.
OR, if it's easier, I could have the user enter the F3 value, then just
enter a number in another cell (let's say F4), and click a "PLUS" or "MINUS"
button. Then, on buttonclick, the value in F4 is either added to or
subtracted from the right D cell (in the row where the A cell has the value
in F3).
As you can see, I'm just trying to make it so that numbers can be added to
or subtracted from a D cell where the A cell value matches a specified
criteria. In VBA I'm having a very hard time doing this, and it's probably
a very simple goal. I'm currently having a problem using the VLOOKUP
concept to CHANGE values, as opposed to just looking them up.
Any ideas or input or (would love it) code snippets?
Thanks all for any help, and for taking the time to read.
The Complete Newb
After a couple hours of attempts, I've gotten close but have no cigar.
I'm trying to make it so that a user enters a value (text) in a particular
cell (let's say F3), then clicks one of two buttons (a PLUS button or MINUS
button) a certain number of times. Each click adds 1 (clicking 5 times = 5,
clicking 7 times = 7, etc.), and, depending on which button it is, the
number of clicks is either added to or subtracted from the current value in
the cell 3 columns to the right of the cell that contains the value in F3.
Examples:
Column A has text values all the way down. Cell A24 has "truck" in it.
User enters "truck" in F3, then clicks the PLUS button 5 times. Each click
adds 1 to the number in cell D24. So if D24's value is 12 before user
clicks the PLUS button for the first time, it has 13 when user clicks once,
14 when user clicks twice, etc.
Let's say cell A46 has "drag". User enters "drag" in F3, then clicks the
MINUS button 7 times. If D46 had 30 before user started clicking the MINUS
button, it has 29 the first click, 28 the second click, etc., and the final
value whne user is done is 23.
Now, I can use any number of methods that might be easier. For instance,
the value doesn't have to be incremented each click, the variable of click
counting can just add up the clicks, and then when the user hits "Enter" on
the keyboard, the total number of clicks is added or subtracted from the
correct cell.
OR, if it's easier, I could have the user enter the F3 value, then just
enter a number in another cell (let's say F4), and click a "PLUS" or "MINUS"
button. Then, on buttonclick, the value in F4 is either added to or
subtracted from the right D cell (in the row where the A cell has the value
in F3).
As you can see, I'm just trying to make it so that numbers can be added to
or subtracted from a D cell where the A cell value matches a specified
criteria. In VBA I'm having a very hard time doing this, and it's probably
a very simple goal. I'm currently having a problem using the VLOOKUP
concept to CHANGE values, as opposed to just looking them up.
Any ideas or input or (would love it) code snippets?
Thanks all for any help, and for taking the time to read.
The Complete Newb