+ Reply to Thread
Results 1 to 3 of 3

Select every N-th row and replace column values

  1. #1
    Registered User
    Join Date
    10-26-2020
    Location
    Norway
    MS-Off Ver
    365
    Posts
    3

    Select every N-th row and replace column values

    Hi,

    I'm new to VBA and macro so I need help with a script/code that can select every 18th-21th row and replace column "I" with the following values:

    - Paranøtter
    - Pekannøtter
    - Pistasjnøtter
    - Valnøtter

    and replace column "L"-"O" to blank (should be no values).

    This should be a loop.

    I have attached a part of my dataset and highlighted the rows and columns I want to change. I have also attached a picture to better understand why this should be repetitive.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by ushbar; 10-28-2020 at 09:07 AM. Reason: more information to understand the problem better

  2. #2
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Select every N-th row and replace column values

    It is not a problem to replace the data and clear the range.
    Questions:
    - why only rows 18 - 21? (my be 18 - 22!!)
    - what are the rules for searching rows for data replacement?
    Best Regards,
    Maras.

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

    Re: Select every N-th row and replace column values

    Try on a copy of your original first.
    Please Login or Register  to view this content.

+ 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. Replies: 7
    Last Post: 10-26-2020, 07:05 AM
  2. [SOLVED] macro to select and rank top 10 column B values for Column A values
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2018, 06:38 AM
  3. [SOLVED] VBA Code replace old values to new values depends upon column values
    By johnlara in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2015, 08:19 AM
  4. Need a query for select & replace the column values in vba
    By kavitha.v in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2014, 05:54 AM
  5. Macro to identify column by header and replace number values with string values
    By kang6789 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2013, 05:44 PM
  6. Macro to find all specific values in column and replace adjacent cell values
    By dblock02 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2013, 06:03 AM
  7. Select a range named and replace values
    By Kamusksn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-08-2013, 08:22 AM

Tags for this Thread

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