+ Reply to Thread
Results 1 to 2 of 2

Need to select multiple rows based on cell value

  1. #1
    Registered User
    Join Date
    01-20-2014
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    2

    Need to select multiple rows based on cell value

    I have a code I've made to paste formulas for an entire row based on the value of one cell within that row, but it will only select one row at a time. I would like it to select all rows that have that same value so I don't have to keep running the macro over an over.

    In the example, I am using this to clear out data for employees on a spreadsheet who have been terminated, so their status is listed as TERM in column V. This is the code I have been using:

    ActiveSheet.Select
    Rows("62:62").Select
    Selection.Copy
    Dim rngA As Range
    Dim cell As Range
    Set rngA = Range("V6", Range("V61"))
    For Each cell In rngA
    If cell.Value = "TERM" Then
    cell.EntireRow.Select
    End If
    Next
    Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
    SkipBlanks:=False, Transpose:=False

    Any assistance I can get is greatly appreciated! Thank you.

  2. #2
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,239

    Re: Need to select multiple rows based on cell value

    Please Login or Register  to view this content.
    or you can do
    Please Login or Register  to view this content.
    OR you can manipulating this data
    Please Login or Register  to view this content.
    Last edited by daboho; 03-03-2018 at 03:40 PM.
    "ThankyouFor Attention * And Your Help!!"

+ 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. Select range of rows based on cell value
    By amitmodi_mrt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2017, 08:03 AM
  2. Select a cell at random based on multiple selection criteria across multiple sheets.
    By scottyms in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2016, 09:44 AM
  3. Select multiple rows and cells based on a single date
    By UTLee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-16-2013, 11:09 AM
  4. [SOLVED] Macro that will select range based off cell value in multiple rows
    By hambly in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-09-2013, 03:05 PM
  5. How to select rows based on data in a column off multiple sheets?
    By wdwinterfang in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-20-2013, 11:51 PM
  6. [SOLVED] Macro that will select range based off cell value in multiple rows
    By hambly in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-14-2013, 09:12 AM
  7. [SOLVED] Select rows based on date range and copy to multiple tabs
    By B-Rell in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-01-2012, 09:27 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