+ Reply to Thread
Results 1 to 7 of 7

Cut and Paste a row of data based on the data in a cell

  1. #1
    Forum Contributor
    Join Date
    08-22-2013
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    157

    Cut and Paste a row of data based on the data in a cell

    Hi Everyone,

    Is it possible to have Excel cut and paste a row of data if a cell in that row contains the word "YES"?

    I am unable to attach files at all due to problems with my PC but I will give as much info as I can here, if any more is needed please ask and I will give any information you need.

    The tab that I want the rows to be cut from is called "Master Tracker" and the tab I want them to be pasted into is called "Released"

    The column that will have the word "YES" written in is column "K".

    The rows that will be cut and pasted will be anywhere from row 10+.

    I want the whole row to be cut and pasted if the value in column K for that specific row is "YES".

    Thank you very much in advance,

    Alex

  2. #2
    Forum Contributor wakeupcall's Avatar
    Join Date
    02-29-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: Cut and Paste a row of data based on the data in a cell

    Hi Alex,

    I believe this should work

    Please Login or Register  to view this content.
    Last edited by wakeupcall; 11-21-2013 at 06:51 AM.
    Liked the answer given? click * to say so

  3. #3
    Forum Contributor
    Join Date
    08-17-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    132

    Re: Cut and Paste a row of data based on the data in a cell

    Hi Alex,

    This code will start checking "Yes" starting from K1 till last available data cell in that column and will move all "Yes" marked data to next sheet.

    It will then remove the blank rows from the master tracker sheet.

    Please Login or Register  to view this content.
    Regards,
    BS

  4. #4
    Forum Contributor
    Join Date
    08-22-2013
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Cut and Paste a row of data based on the data in a cell

    Hi, thank you both for replying, it is much appreciated.

    I am a complete "noob" (for want of a better word) when it comes to VBA and I have no idea where I am supposed to insert the code or which cell I should be clicked on when I insert it (if that matters). I also have no idea how to save the code or how to run it and keep it running whenever my worksheet is open.

    If you could talk me through it I would be extremely grateful.

    Thanks again,

    Alex

  5. #5
    Forum Contributor wakeupcall's Avatar
    Join Date
    02-29-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: Cut and Paste a row of data based on the data in a cell

    Hi Alex,

    Whichever code you decide to use, you should copy/paste it in ThisWorkbook object of your excel file.

    When you open the VB Editor (Developer tab --> Visual Basic), on the left you should see a Project Window showng a set of hierchies. Select the one that says VBA Project and the name of you file in brackets. When you open the Microsoft Excel Objects folder you will see ThisWorkbook object.

    As to the running of the macro - you have several options
    1) Run it from View tab---> Macros --> Open macros -->selecting macros stored in ThisWorkbook and the name of the macro
    2) The other option is to assign it to a button to be inserted somewhere in your workbook

    For more instructions how to assign macro to a button (or have the Developer tab displayed if it is currently not), you can refer to
    http://office.microsoft.com/en-us/ex...rms_toolbar%29

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Cut and Paste a row of data based on the data in a cell

    Another:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-22-2013
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Cut and Paste a row of data based on the data in a cell

    Thank you very much :D

+ 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 and paste discrete data based on cell value using VBA
    By meincontroller in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2013, 09:27 AM
  2. [SOLVED] Copy and paste discrete data based on cell value using VBA
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-14-2013, 03:12 PM
  3. Copy and Paste Data based on a value within a cell
    By gally in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2013, 04:43 AM
  4. Open file based on cell value and paste data
    By aller01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2011, 04:29 PM
  5. Paste data into cell based on date variables
    By tanewha69 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2006, 06:44 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

X vBulletin 4.1.8 Debug Information

  • Page Generation 0.47370 seconds
  • Memory Usage 9,028KB
  • Queries Executed 15 (?)
More Information
Template Usage (34):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (3)bbcode_code
  • (1)footer
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (7)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (4)navbar_noticebit
  • (6)option
  • (7)postbit_legacy
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (4)showthread_bookmarksite
  • (5)showthread_similarthreadbit
  • (1)showthread_similarthreads
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper
  • (1)vbseo_linkbackmenu_entry 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (39):
  • ./vbseo.php
  • ./env.php
  • ./vbseo/includes/functions_vbseo.php
  • ./vbseo/includes/functions_vbseo_pre.php
  • ./vbseo/includes/functions_vbseo_url.php
  • ./vbseo/includes/functions_vbseo_createurl.php
  • ./vbseo/includes/functions_vbseo_db.php
  • ./vbseo/includes/functions_vbseo_vb.php
  • ./vbseo/includes/functions_vbseo_seo.php
  • ./vbseo/includes/functions_vbseo_misc.php
  • ./vbseo/includes/functions_vbseo_crr.php
  • ./vbseo/includes/functions_vbseo_cache.php
  • ./vbseo/includes/functions_vbseo_hook.php
  • ./vbseo/includes/functions_vbseo_startup.php
  • ./includes/config.php
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/functions.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/functions_cforum.php
  • ./includes/functions_facebook.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (48):
  • init_startup
  • friendlyurl_resolve_class
  • database_pre_fetch_array
  • database_post_fetch_array
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • fetch_musername
  • cache_templates
  • template_register_var
  • parse_templates
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • reputation_image
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • showthread_similarthread_query
  • showthread_similarthreadbit
  • forumrules
  • showthread_bookmarkbit
  • navbits
  • navbits_complete
  • showthread_complete


Search Engine Friendly URLs by vBSEO 3.6.0 RC 1