+ Reply to Thread
Results 1 to 5 of 5

Need to copy value to other section from specific critera

  1. #1
    Registered User
    Join Date
    08-16-2016
    Location
    Montreal
    MS-Off Ver
    2007
    Posts
    3

    Need to copy value to other section from specific critera

    Hi,

    I have a sheet on the left who have the names and type of room and amount of number of persons
    and on the right it's just a test I want to do for now, I try to move the rows who match the label1 where is
    writed NST1 or the selected radio button to the right but to the 1st lines on the right section.

    But on what I have so far it's copy the left section who have the NST1 value to the right but just the same line 4 times (i think it's the last selection, or the for each it's loop double times)

    Thanks

    Please Login or Register  to view this content.
    http://i.imgur.com/oKX1CZ7.png

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Need to copy value to other section from specific critera

    Hello
    Welcome to the forum. Attached is an example file. Does this do what you require?

    DBY
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-16-2016
    Location
    Montreal
    MS-Off Ver
    2007
    Posts
    3

    Re: Need to copy value to other section from specific critera

    Yep thanks, your code is very well done, it's exactly what I needed :D

    but just an another thing, what is the purpose of those line ?
    Application.CutCopyMode
    Application.ScreenUpdating

    and also how I can directly when an option button is selected to make highlighted the value rows who is find ?

    Thanks again

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Need to copy value to other section from specific critera

    Hello
    See the amend attachment to highlight selected rows.

    Application.CutCopyMode: If you select a range and copy (ctrl+C) it you will get a blinking dashed line around the range. This is CutCopyMode. Setting it to false is the equivalent of pressing Escape to get rid of it. I believe it also clears the clipboard. However, in my code it seems redundant, sometimes VBA bypasses the clipboard, so I've removed it.

    Application.ScreenUpdating = False: This as it suggests stops the screen updating as the macro runs, preventing screen flicker and speeding up the code.

    Hope these explanations make some sense.
    DBY
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-16-2016
    Location
    Montreal
    MS-Off Ver
    2007
    Posts
    3

    Re: Need to copy value to other section from specific critera

    Thanks again sorry for the late reply , it's work very well

    And thanks also for the info about CutCopymode and ScreenUpdating :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 sub section total value to main section***
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2016, 03:14 AM
  2. [SOLVED] Macro to copy specific cell if match critera
    By meabrams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2015, 08:18 AM
  3. need to count a specific number of nonblank cells that match a certain critera
    By JCHRISTMAS1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-02-2015, 11:59 AM
  4. [SOLVED] Macro to copy rows based on a critera and copy the name of the column
    By dreddster in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-10-2013, 11:34 AM
  5. Export to separate documents based on specific critera
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 06-02-2013, 07:02 AM
  6. Extract specific row from specific section in an excel file
    By yodha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2009, 01:27 AM
  7. Average only with specific critera
    By Stephen in forum Excel General
    Replies: 8
    Last Post: 05-19-2006, 01:10 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