+ Reply to Thread
Results 1 to 8 of 8

Select particular value and insert to right x amount of cells

  1. #1
    Forum Contributor
    Join Date
    11-20-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    262

    Select particular value and insert to right x amount of cells

    In the attached workbook I would like to select all the 1's in column A and then insert those cells to the right 3 cells.
    I tried to record a macro and look at the code but it doesn't show me the value I'm using or the number of cells to insert.
    I can't just sort the column in numerical order because the values need to remain in the rows that they are.
    The desired outcome is in G1:K15.
    Just to add to the query, is it possible to have a pop up box asking what value I would like to select all of?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Select particular value and insert to right x amount of cells

    As for a formula you could do this.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by DJunqueira; 02-22-2024 at 10:07 PM.

  3. #3
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,223

    Re: Select particular value and insert to right x amount of cells

    Quote Originally Posted by coach.32 View Post
    I can't just sort the column in numerical order because the values need to remain in the rows that they are.
    Try it out. Using column sorting:
    Please Login or Register  to view this content.
    Artik

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Select particular value and insert to right x amount of cells

    For numbers ...
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,527

    Re: Select particular value and insert to right x amount of cells

    See attached
    Allow macros to be used.
    Attached Files Attached Files
    Experience trumps academics every day of the week and twice on Sunday.

  6. #6
    Forum Contributor
    Join Date
    11-20-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    262

    Re: Select particular value and insert to right x amount of cells

    Thank you. This is perfect.

  7. #7
    Forum Contributor
    Join Date
    11-20-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    262

    Re: Select particular value and insert to right x amount of cells

    I never thought you could use formulas. Thank you so much. Something else I have learnt from.
    Thank you for all the options shown, it has definitely broadened my knowledge.
    Last edited by coach.32; 02-22-2024 at 11:51 PM.

  8. #8
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Select particular value and insert to right x amount of cells

    Tks for the feedback, glad to help you to expand your knowledge.

+ 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] question about coding to select fixed amount of columns but variable amount of rows
    By PitchNinja in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-07-2023, 10:23 AM
  2. Insert X amount of cells
    By porepiga in forum Excel General
    Replies: 2
    Last Post: 08-17-2021, 08:40 AM
  3. [SOLVED] Select cells, insert new row, move rest of table down
    By Bob_James in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2015, 05:42 AM
  4. Select only filled cells in column to use insert command
    By Nancy Dratwa in forum Excel General
    Replies: 1
    Last Post: 08-19-2013, 11:03 AM
  5. [SOLVED] VBA Randomly Select m amount from n amount of data, where m<n
    By doglover in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-23-2013, 03:44 AM
  6. Select cells without formula & insert different value
    By Jokacave in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2010, 08:04 AM
  7. Replies: 3
    Last Post: 08-21-2009, 06:02 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