Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2023, 06:46 PM
oscarlimerick oscarlimerick is offline Select a range of cells to cpy based on a text searh Windows 8 Select a range of cells to cpy based on a text searh Office 2013
Advanced Beginner
Select a range of cells to cpy based on a text searh
 
Join Date: Jul 2020
Posts: 57
oscarlimerick is on a distinguished road
Default Select a range of cells to cpy based on a text searh


Hello to the wise and learned folks at the excel forum. So I have attached a sample spreadshet to illustrate what I want to do. The actual spreadsheet I am working on is much larger than this one. As you can see, I have a worksheet with a cell range of A1 to F4. What I wish to do is find a formula that will allow me to select every row that has the text"SAFEWAY" in it, I would prefer the search is not case sensitive. Then after finding all the matches, I want to have excel automatically select not only those cells, but the entire row that cntains this text. In my example all of the matches to "SAFEWAY" are in columns E and F, but in my larger spreadsheet, the match could be in any column. I want any cell that matches "SAFEWAY" or "safeway" to be selected, along wih the entire row that the cell is in, as hilighted in red on my sample spreadsheet. Thanks for your help
Attached Files
File Type: xlsx FILE SENT TO EXCEL SUPPORT.xlsx (10.1 KB, 3 views)
Reply With Quote
  #2  
Old 07-17-2023, 11:21 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Select a range of cells to cpy based on a text searh Windows 10 Select a range of cells to cpy based on a text searh Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi
are you still using XL2013?
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 07-18-2023, 01:27 PM
Alansidman's Avatar
Alansidman Alansidman is offline Select a range of cells to cpy based on a text searh Windows 11 Select a range of cells to cpy based on a text searh Office 2021
עַם יִשְׂרָאֵל חַי
 
Join Date: Apr 2019
Location: Steamboat Springs
Posts: 79
Alansidman will become famous soon enoughAlansidman will become famous soon enough
Default

Here is a VBA solution

Code:
Option Explicit

Option Compare Text
Sub Safeway()
    Dim rng As Range, c As Range
    Set rng = Range("B3:F14") 'Change this range to your actual range of data.
    For Each c In rng
        If InStr(c, "Safeway") > 0 Then
            c.EntireRow.Interior.ColorIndex = 6
        End If
    Next c
    MsgBox "Action Completed"
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Distribute text in one cell across a range of cells (overcoming selection.range.cells.count bug) slaycock Word VBA 0 02-18-2017 07:00 AM
Select a range of cells to cpy based on a text searh Dynamically select a TextBox based on range value IIOII Word VBA 8 07-20-2016 11:28 PM
Select a range of cells to cpy based on a text searh Help with Index Function to Select Range of Cells bretyuin Excel 1 02-24-2016 05:11 AM
Select a range of cells to cpy based on a text searh select a cluster of point from a range based on x and y values sandcharles Excel 5 02-19-2015 06:15 AM
Color-fill a range of cells, based on text in a different sheet. Possible? unittwentyfive Excel 2 06-01-2014 06:48 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft