+ Reply to Thread
Results 1 to 5 of 5

VBA to update only selected and visible cells

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Davenport, Iowa
    MS-Off Ver
    Excel 365
    Posts
    206

    VBA to update only selected and visible cells

    Hi,

    I have a workbook where I have to update a list of dates, and was wondering if there was a way where I could have my filter set, select a group of dates and update the visible cells with a date from a prompt where I would enter in a date? Any Help would be greatly appreciated.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA to update only selected and visible cells

    Hi,

    One way would be to filter the list of dates you want to change and then use code like

    Please Login or Register  to view this content.
    Personally I'd use something a bit more robust than an Input Box to capture a date and use either a DATESERIAL number to populate the dt variable, or simply record the date you want to change to in a cell and read that into the dt variable.

    You could also get the macro to filter your data first.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Davenport, Iowa
    MS-Off Ver
    Excel 365
    Posts
    206

    Re: VBA to update only selected and visible cells

    Works well, but if I have a couple workbooks open, this is a little slow. What was your other suggestion?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA to update only selected and visible cells

    Not sure why it should be slow or why having other workbooks open would slow it down.
    Is it still slow if you close the other workbooks? Are the other workbooks linked by any chance?

    How many rows are you dealing with?

    Upload the actual workbook for a more considered response.

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Davenport, Iowa
    MS-Off Ver
    Excel 365
    Posts
    206

    Re: VBA to update only selected and visible cells

    Thanks Richard, The other workbooks are around 40 mb, closing them made a huge difference. This will work, thank you!

+ 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. Copy to Paste the Sum of the Selected VISIBLE Cells
    By Enright in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2016, 11:22 AM
  2. [SOLVED] Macro to move visible cells up one row in a selected cell
    By ediman16 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2015, 05:34 AM
  3. Replies: 1
    Last Post: 11-11-2014, 06:10 PM
  4. [SOLVED] Swap Selected Visible Cells to Values to right of the Selection
    By Brawnystaff in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-12-2014, 02:46 PM
  5. [SOLVED] Selected cells not visible
    By LAUR in forum Excel General
    Replies: 1
    Last Post: 05-15-2006, 02:45 PM
  6. [SOLVED] How to update values on cells in visible range only
    By Roger Govier in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2006, 11:10 AM
  7. [SOLVED] contents in cells are not visible when word wrap is selected
    By Steve in forum Excel General
    Replies: 2
    Last Post: 01-06-2006, 08:40 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