+ Reply to Thread
Results 1 to 5 of 5

Moving an entire row of an expired item from one to another

  1. #1
    Registered User
    Join Date
    12-23-2018
    Location
    Ghana
    MS-Off Ver
    2013
    Posts
    2

    Unhappy Moving an entire row of an expired item from one to another

    Please Login or Register  to view this content.
    End Sub[/CODE]
    Last edited by yanney; 12-26-2018 at 05:06 AM.

  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: Moving an entire row of an expired item from one to another

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    As this is your first time I'll add them for you, but please note for the future.

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    One thought springs to mind and that's rather than loop through all your data along with a Union instruction to build a range of cells you want to transfer, just use an autofilter to identify the data in question then use the SpecialCells(xlCellTypeVisible) syntax to copy the whole lot with one instruction. It will be much faster than a loop,
    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 Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Moving an entire row of an expired item from one to another

    Please Login or Register  to view this content.
    The above syntax is incorrect. Below defines cell A3 to the last used cell in column A...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    12-23-2018
    Location
    Ghana
    MS-Off Ver
    2013
    Posts
    2

    Re: Moving an entire row of an expired item from one to another

    I am sincerely grateful for your response . Thank you for the corrections concerning the rules and the syntax.
    I have made the necessary corrections as you directed.
    Again,I tried running the codes but is still not working..its gave me "subscript out of range with run-time error 9.
    Any further help will be appreciated .Thank you

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Moving an entire row of an expired item from one to another

    In your original post above, only put CODE tags around your actual code. Not around your comments. It should be formatted like this post. It makes it much easier to read.

    Please Login or Register  to view this content.

+ 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] When file opens, Macro not moving expired record(s) to other sheet and deleting row(s)
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-30-2016, 07:12 AM
  2. Help With vba list-box add item for entire row
    By Eng.Hashem in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2015, 01:01 AM
  3. Replies: 1
    Last Post: 08-22-2014, 12:27 AM
  4. Replies: 1
    Last Post: 10-09-2013, 11:44 AM
  5. [SOLVED] Moving entire rows to new sheet once item has a status of "Sold"
    By Linklog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2013, 04:10 PM
  6. Identifying an item in one col/row and searching an entire spreads
    By Bennie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  7. [SOLVED] Identifying an item in one col/row and searching an entire spreads
    By Bennie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11: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