+ Reply to Thread
Results 1 to 2 of 2

copy paste row or range of cells

Hybrid View

  1. #1
    Registered User
    Join Date
    12-22-2013
    Location
    Colorado
    MS-Off Ver
    Excel 2007
    Posts
    7

    Unhappy copy paste row or range of cells

    Not a expert in programming, but not a newbie either. Can understand the logic but miss the syntax sometimes. Have gone through post pertaining to copying and pasting a row from one sheet to another and tried multiple approaches. This should be a simple process.
    I have one sheet with 6 cols of decimal numbers.
    Picture1.gif
    Then I have a second sheet that represents a binary equivalent of a decimal number.
    Picture2.gif
    The goal is to read a value (i.e. A1) on sheet Decimal and based on the value choose the corresponding row from sheet Binary and copy that row to a third sheet named TestCol1.
    Used a Case Select statement which works but code in each case does not work (which now that I type it case may not be best), but be what it may.
    Individual case code is:

    Case 3
    'Cut and Paste
    Sheets(“Binary”).Rows(tmp).EntireRow.Select
    Sheets(“Binary”).Rows(tmp).EntireRow.Copy
    Sheets(outSheet).Cells(outputRow, outputCol).Select
    Sheets(outSheet).Paste
    'Set to read next Number
    inputRow = inputRow + 1
    'Set to output next row
    outputRow = outputRow + 1

    I have tried multible approches but keep getting error messages out of range (9) or 1004
    Used Worksheets.Sheets(.......
    changed to Worksheets.Sheets(.......)Range.(cells(tmp,inputCol),cells(tmp,inputCol+5).select or copy
    Doesn't work.



    Would someone please point out the elephant for me please.

    Thank you
    Last edited by tahano54; 03-25-2014 at 07:27 PM. Reason: edit post

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

    Re: Elephant in the room

    You need to comply with Forum Rule No. 1.

    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change the title of the thread, click EDIT on the original post, then click the Go Advanced button, then change the title. If two or more days have passed, the EDIT button will not appear, and you need to ask a moderator to change the title.

+ 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. Chat Room
    By Workle in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 12-10-2015, 09:22 AM
  2. [SOLVED] Run Out Room On If Statements
    By timbo1957 in forum Excel General
    Replies: 3
    Last Post: 07-24-2012, 11:51 AM
  3. How many people were in my room?
    By jack6602 in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 07-25-2010, 01:16 PM
  4. room schedule
    By jenn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-15-2005, 12:06 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