+ Reply to Thread
Results 1 to 9 of 9

Code needs to Clear old data then Update specified Ranges when Value in Drop down is Chang

  1. #1
    Registered User
    Join Date
    04-08-2012
    Location
    Kansas, U.S
    MS-Off Ver
    Excel 2010
    Posts
    93

    Code needs to Clear old data then Update specified Ranges when Value in Drop down is Chang

    Hello All, Code needs to Clear old data then Update specified Ranges when Value in Drop down is Chang

    Needing the following code altered if possible so that when Drop Down list value is changed the Code will Clear all Data from Main Gear starting at B:R44 and down 2, 4, 20 how ever many lines of data there are, and then place the new data in

    Please Login or Register  to view this content.
    Thanks Again,
    Aeneren

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Code needs to Clear old data then Update specified Ranges when Value in Drop down is C

    See if this works for you
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-08-2012
    Location
    Kansas, U.S
    MS-Off Ver
    Excel 2010
    Posts
    93

    Re: Code needs to Clear old data then Update specified Ranges when Value in Drop down is C

    JLGWhiz,

    Getting a: Run Time error '9' Subscript of of Range

    Please Login or Register  to view this content.
    Aeneren

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Code needs to Clear old data then Update specified Ranges when Value in Drop down is C

    Quote Originally Posted by Aeneren View Post
    JLGWhiz,

    Getting a: Run Time error '9' Subscript of of Range

    Please Login or Register  to view this content.
    Aeneren
    If Range B1 of Main Gear is blank, it might cause the error.
    Last edited by JLGWhiz; 12-19-2015 at 09:47 PM.

  5. #5
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Code needs to Clear old data then Update specified Ranges when Value in Drop down is C

    Never mind, the problem is xlRow should be xlRows.

  6. #6
    Registered User
    Join Date
    04-08-2012
    Location
    Kansas, U.S
    MS-Off Ver
    Excel 2010
    Posts
    93

    Re: Code needs to Clear old data then Update specified Ranges when Value in Drop down is C

    JLGWhiz,

    Ok the Clear and update is working with the following Corrections:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Now i need it to update itself when the Drop down box contents are changed, as it is now the Range only updates if i change tabs and then go back to Main Gear


    Aeneren
    Last edited by Aeneren; 12-19-2015 at 10:39 PM.

  7. #7
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Code needs to Clear old data then Update specified Ranges when Value in Drop down is C

    Which cells contain a drop down that the user might click on?

  8. #8
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Code needs to Clear old data then Update specified Ranges when Value in Drop down is C

    If B42 is the cell with the drop down then this should work.
    Please Login or Register  to view this content.
    Last edited by JLGWhiz; 12-20-2015 at 11:45 AM.

  9. #9
    Registered User
    Join Date
    04-08-2012
    Location
    Kansas, U.S
    MS-Off Ver
    Excel 2010
    Posts
    93

    Re: Code needs to Clear old data then Update specified Ranges when Value in Drop down is C

    JLGWhiz,

    Thanks Again that is working Great.

    Rep added



    Thanks Again
    Aeneren
    Last edited by Aeneren; 12-20-2015 at 03:44 PM.

+ 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. Need Additional Macro Code to clear out data from secondary Page after data has been chang
    By ExcelBeginner326 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-26-2014, 02:05 PM
  2. [SOLVED] Adapt VBA code to clear the related cells instead of update
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2013, 05:50 AM
  3. [SOLVED] Clear 2 ranges of cell data when value is changed in primary drop down
    By ohlalayeah in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2012, 11:17 AM
  4. Replies: 3
    Last Post: 06-29-2012, 03:45 PM
  5. Replies: 4
    Last Post: 06-11-2012, 06:17 PM
  6. Clear Contents on Update when other code exists in the Worksheet_Change thingy
    By JRS_ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2011, 12:11 PM
  7. VBA Macro code to clear drop-down menu selection.
    By lealea1982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2007, 12:05 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