Results 1 to 11 of 11

Combobox - insert text to cells

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    Combobox - insert text to cells

    Hi,

    I have a Combobox which lists text (time-intervals). I managed to split this text in Combobox and put It separately in two cells under, for needs of calculating time differences.

    Problem is, that I need this kind of solution for many rows(79) and columns (31), and all this Comboboxes must insert text only in cells right under them. Combobox is not positioned in cell, so I don't know how to write code that would do that, other than write a code for each Combobox alone (that would be like 2.400 times !).

    Please take a look at my sample worksheet, notice that only first "solution" (column B and C) is programmed so far. I want It to be done for both (and all afterwards), in a VBA loop maybe...

    My code so far:

    Private Sub ComboBox1_Change()
    
    If ComboBox1.ListIndex <> "" Then
    Range("B4").Value = Left(ComboBox1.Value, 5)
    Range("C4").Value = Right(ComboBox1.Value, 5)
    End If
    End Sub
    Is It even possible ?

    Thanks for help !!

    Regards, Luka
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. combobox text - insert formula
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2014, 04:40 PM
  2. Insert text next to selected cells
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2010, 12:01 PM
  3. Combobox to determine text for a range of cells
    By Robbyn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2006, 10:25 AM
  4. Compare Text/combobox values against cells in spreadsheet
    By BigPig in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-20-2006, 01:30 PM
  5. insert text in a no. of cells of each sheet?
    By hally in forum Excel General
    Replies: 3
    Last Post: 05-06-2005, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1