Input Value of Combo Box Dropdown Click to the Next Empty Cell (VBA)

rieuji

New Member
Joined
Jun 10, 2022
Messages
2
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi. I've been looking for answers everywhere about this but I couldn't find any. Basically, I want to use Combo Box Dropdown, upon clicking a selection, I want the value to be pasted on the next empty row/cell.
So if I click the "Pineapple" in the Dropdown, I want it to be entered on Cell 4, right below the Cell 3 = "Guava". Then the process continues. I believe it has something to do with setting up the "LinkedCell" but I don't know how to do it. Thanks in advance.






1654912968628.png
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Assuming we want the value entered in column "B"
Try this:
VBA Code:
Private Sub ComboBox1_Change()
'Modified  6/10/2022  11:12:14 PM  EDT
Application.ScreenUpdating = False
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "B").End(xlUp).Row + 1
Cells(Lastrow, 2).Value = ComboBox1.Value
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,223,996
Messages
6,175,857
Members
452,676
Latest member
woodyp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top