+ Reply to Thread
Results 1 to 11 of 11

Need help: creating a list based on a single dynamic cell

Hybrid View

  1. #1
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    Office 2010
    Posts
    22

    Need help: creating a list based on a single dynamic cell

    HI friends, i needed a vba macro code that automatically creates a list, from A1 to A2 an so on, based on values of another cell C1 that constantly changes it's values, every 1 second. i tried this code:

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Target = Range("C1") Then
            Sheet2.Range("A" & Rows.Count).End(xlUp).Cells(2, 1) = Sheet1.Range("A1")
        End If

    But when i tried it, i needed to press enter every time i changes the values on C1 cell, if didnt press, it didnt create my list.

    So can someone please help me in a code that doesnt need to press enter to progress the list, i dont know maybe automatically pressing enter button on c1 cell in a macro.

    Thanks for any help.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Need help: creating a list based on a single dynamic cell

    Have you tried using the Worksheet_Calculate event instead?

    It's also a good idea to turn off events while an event macro is running to prevent new instances being run.

    Application.EnableEvents =False
    ....
    Application.EnableEvents =True

  3. #3
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    Office 2010
    Posts
    22

    Re: Need help: creating a list based on a single dynamic cell

    i'm sorry i dont code in vba. Could you please show me the code in a way i put on module?

    actually my previous code has a problem to, because when i compile it show error on end sub. If you could helpe me

    i would really appreciate. thanks
    Last edited by coringa; 02-28-2016 at 06:59 PM.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Need help: creating a list based on a single dynamic cell

    Try

    Private Sub Worksheet_Calculate ()
    Application.EnableEvents =False
    Sheet2.Range("A" & Rows.Count).End(xlUp).Offset(1, 0) = Sheet1.Range("A1")
    Application.EnableEvents =True
    End Sub

  5. #5
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    Office 2010
    Posts
    22

    Re: Need help: creating a list based on a single dynamic cell

    hi i tried it but didnt work. I put your code on module, but i change A1 from sheet 1 number several times, it didnt create my list on sheet 2 with these different numbers unfortunately. So do you got any idea how to make it work, Thanks for your time.
    Last edited by coringa; 03-01-2016 at 10:18 AM.

  6. #6
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    Office 2010
    Posts
    22

    Re: Need help: creating a list based on a single dynamic cell

    .hi i tried it but didnt work. I put your code on module, but i change A1 from sheet 1 number several times, it didnt create my list on sheet 2 with these different numbers unfortunately. So do you got any idea how to make it work, Thanks for your time.

  7. #7
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    Office 2010
    Posts
    22

    Re: Need help: creating a list based on a single dynamic cell

    heeeelp heeeelp heeeelp heeeelp heeeelp heeeelpheeeelpheeeelpheeeelpheeeelp

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Need help: creating a list based on a single dynamic cell

    What exactly are you trying to do, and does it have to be VBA?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    Office 2010
    Posts
    22

    Re: Need help: creating a list based on a single dynamic cell

    yes, i have a cell that continuousily change it's values, so i need a code that automatically grab this dynamic cell number on D1, and so every new numbers on D1 that changes, from the previousily like now is 10 next it show 20, in the cell will be stored in order on A column these numbers like for example .First line 10 then line 2, show 20

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Need help: creating a list based on a single dynamic cell

    So you want whatever value is shown in D1, to be placed in the next empty cell in column A?

  11. #11
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    Office 2010
    Posts
    22

    Re: Need help: creating a list based on a single dynamic cell

    yes sir, forming a list with these numbers. I got a old code, but i needed to press enter for every new record on collumn A. If you could
    solve this problem i'll be very thankfull

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need help: creating a list based on a single dynamic cell
    By coringa in forum Excel General
    Replies: 2
    Last Post: 01-01-2016, 08:50 PM
  2. Creating separate sheets based on single rows in list?
    By Taxster in forum Excel General
    Replies: 3
    Last Post: 12-16-2014, 04:24 PM
  3. Replies: 9
    Last Post: 02-26-2014, 04:17 PM
  4. [SOLVED] Creating Dynamic Hyperlinks based on known cell value
    By scaffdog845 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-13-2012, 01:37 PM
  5. Creating a formula based on dimensions in a single cell
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-18-2009, 10:47 AM
  6. Dynamic Data Validation based on series in a single cell
    By ExcelLefty in forum Excel General
    Replies: 4
    Last Post: 09-29-2009, 08:45 AM
  7. Creating a Dynamic Inventory List Based on Daily Sales
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-29-2005, 11:01 AM

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