+ Reply to Thread
Results 1 to 3 of 3

Select range of cells to copy/paste values based on contents of a different cell

  1. #1
    Registered User
    Join Date
    12-23-2010
    Location
    Leeds, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Post Select range of cells to copy/paste values based on contents of a different cell

    Hi to all you experts.

    I have a problem that I just cannot solve and hope you can help me with. It may require code or a simple formula/function. Basically I wish to copy data (that could be text or numeric) from row 3 on (sheet 1) and paste the values into a different sheet. The data is spread over 16 columns [B(3) to Q(3)] but I wish to select the required number of columns based on the manually entered value in A(2). So if A(2) contains the number 9 I only wish to select the first 9 columns in the range i.e. B(3) through J(3) alternatively if A(2) contains the number 15 the selection range would be the first 15 columns B(3) through P(3).

    Any help would be greatly appreciated.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Select range of cells to copy/paste values based on contents of a different cell

    try this:

    Change up the destination as needed

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    12-23-2010
    Location
    Leeds, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Select range of cells to copy/paste values based on contents of a different cell

    Quote Originally Posted by alansidman View Post
    try this:

    Change up the destination as needed

    Please Login or Register  to view this content.
    you guys are amazing...that's great! thanks for that

+ 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] Copy & Paste Cell Contents into Comments in another range of cells
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-12-2015, 06:38 PM
  2. [SOLVED] Copy Paste a Range of Values from a Different Sheet Based on Value Entered in Cell
    By hamidxa in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-13-2015, 04:53 PM
  3. [SOLVED] Copy and Paste Range of Cells based on # of cell values in Column A
    By bwaite87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2014, 05:51 PM
  4. Replies: 1
    Last Post: 02-12-2014, 05:29 AM
  5. [SOLVED] Copy Paste Contents based on contents in designated cell
    By nickmessick1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2014, 01:23 PM
  6. Replies: 1
    Last Post: 10-14-2012, 09:25 AM
  7. Replies: 7
    Last Post: 07-04-2006, 03:20 AM

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