Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2016, 10:37 AM
KingoftheKassel KingoftheKassel is offline Want to copy all rows that contain a specific value in column B Windows 7 64bit Want to copy all rows that contain a specific value in column B Office 2010 64bit
Novice
 
Join Date: Jul 2015
Posts: 5
KingoftheKassel is on a distinguished road
Default

What you need is the "Find" method. Here's the link that has a great explanation. After you define whatever you're looking for set a variable equal to your search variable then add ".EntireRow.Select" or copy or whatever you want to do. Here's an example of something I did before using .find :



Sub Frank ()

Dim source As Range
Dim FFS as Range
Dim destRow as String

Set source = ActiveWorkbook.Worksheets("IMPORT").Range("A9:A100 00")

Set FFS = source.Find(what:=searchString, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns)
destRow = FFS.EntireRow.Cut

End Sub


This code won't do EXACTLY what you're looking for, it's just an example of what how I used '.Find' . The link below will help tons.

http://www.globaliconnect.com/excel/...=79&Itemid=475
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
If column B cell is a certain value then copy and paste the value to column A Snaybot Excel Programming 1 12-01-2015 07:10 PM
Copy column 1 data into Column 3 ShailShin Word VBA 1 06-18-2015 10:49 AM
Excel copy two numbers between specific column and paste in next sheet visha_1984 Excel 1 12-26-2014 07:59 PM
how can i split a column of rows in half without copy and paste.. Lindseyfparker Excel 2 04-25-2014 12:52 AM
Want to copy all rows that contain a specific value in column B Find specific rows then copy and paste to new doc konopca Word VBA 5 02-20-2014 02:34 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:36 AM.


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