Feed cells from values of a listbox

crackwood01

New Member
Joined
Mar 16, 2016
Messages
34
Hi forum!

I would like to fill cells from column DC with the values clicked in a listbox multi.

here is my code so far

HTML:
Dim i As Long
For i = 0 To Me.ListBox1.ListCount
Worksheets("Clients").Cells("DC4").Value = ListBox1.Value
Next

How can this be possible, plus it needs to fill going down

Dc4
Dc5

ect

sorry for my english
 
Last edited:

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
46,530
Office Version
  1. 365
Platform
  1. Windows
How about
Code:
   Dim i As Long, j As Long
   j = 3
   With Me.ListBox1
      For i = 0 To .ListCount - 1
         If .Selected(i) Then
            j = j + 1
            Worksheets("output").Range("DC" & j).Value = .List(i)
         End If
      Next i
   End With
 

Watch MrExcel Video

Forum statistics

Threads
1,109,360
Messages
5,528,233
Members
409,809
Latest member
VICKRAM

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top