Macro to fill in cells from a column sequentially when I click on a button

MaryZ

New member
Joined
Feb 20, 2015
Messages
1
Reaction score
0
Points
0
Hello.
I'm have a lot of trouble trying to figure this out.

This is my layout:

7bgPbKC.png

As you can see, I have 2 buttons.
What I would like each button to do is:
1. Each time I click on YES, it will insert a Y in a cell in a specific range.
2. If I click on YES again, it will automatically insert a Y in the next cell under the previous one in the same column.
3. As you can see, if I have to click on NO, it will also continue down the column and insert an N.


If someone can help me out with this I'd be very thankful!
 
Last edited:
To the YES button assign this macro:

Code:
Sub YesButton()
    Range("F" & Cells(Rows.Count, "F").End(xlUp).Row + 1).Value = "Y"
End Sub

and to the NO button assign this macro:

Code:
Sub NoButton()
    Range("F" & Cells(Rows.Count, "F").End(xlUp).Row + 1).Value = "N"
End Sub
 
Cross posts:
http://superuser.com/questions/8803...-column-sequentially-when-i-click-on-a-button
http://www.mrexcel.com/forum/excel-...olumn-sequentially-when-i-click-button-2.html
http://www.excelforum.com/excel-pro...mn-sequentially-when-i-click-on-a-button.html
http://serverquestions.com/question...-column-sequentially-when-i-click-on-a-button
http://nerdanswer.com/answer.php?q=872102

and answered.
MaryZ, please read, especially the section headed "So what's the big deal?" at http://www.excelguru.ca/content.php?184

Cross posting is not a problem; not providing links to those helping (so that they don't waste their time duplicating what someone else has already done) is a problem, ultimately for you more than anyone else, should you need more help later. This is because there are relatively few helpers out there compared with those seeking help, and it quickly gets known who the cross posters are, and the help the cross posters receive dwindles.
Providing links helps the helpers too; they can see other's answers (and clarifications you have given elsewhere) and they can then contribute more appropriately by adding to conversation rather than saying the same things as others have.
 
Back
Top