Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Need to Search Column then Paste Data at end of Row? Advanced Filter?

Hi,
I am going nowhere quick searching for this, so hopefully someone can
help me.

I have a sheet with "x" number of rows of data. I would like to search
the second column for a specific string. Each time the string is
found, I need to paste the value of variable "var1" and "var2" into
column Q and R of that row. I would also like to know how many times
the string was found at paste value into the first column of that row.

I'm sure I could use a For loop to do this, but the data sheet can be
very long and I was wondering if there was a better way to do this with
the ".find()" or ".advancedfilter()" functions.

Thanks,
Logan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Need to Search Column then Paste Data at end of Row? Advanced Filt

I'm glad I saw your posting. I never thought of using the advancedfilter
function for something like this, but I think it could save time. I played
arround with it and came up with this. I think if you tweek it, it should
work.

Selection.AutoFilter Field:=2, Criteria1:="FindThisString"
Dim lngCount As Long
lngCount = Range("B2",
Range("B65536").End(xlUp)).SpecialCells(xlCellType Visible).Count 'lngCount
will give you the totoal number of rows

'Do for only the visible cells
For Each c In Range("B2",
Range("B65536").End(xlUp)).SpecialCells(xlCellType Visible)
c.Offset(0, 15) = "new value"
c.Offset(0, 16) = "new value"
Next



" wrote:

Hi,
I am going nowhere quick searching for this, so hopefully someone can
help me.

I have a sheet with "x" number of rows of data. I would like to search
the second column for a specific string. Each time the string is
found, I need to paste the value of variable "var1" and "var2" into
column Q and R of that row. I would also like to know how many times
the string was found at paste value into the first column of that row.

I'm sure I could use a For loop to do this, but the data sheet can be
very long and I was wondering if there was a better way to do this with
the ".find()" or ".advancedfilter()" functions.

Thanks,
Logan


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data changes in advanced filter David Sher[_2_] Excel Worksheet Functions 2 February 3rd 10 03:50 PM
Advanced filter search [email protected] Links and Linking in Excel 0 February 23rd 07 07:58 AM
Using advanced filter to search for criteria in a list Potatosalad2 Excel Discussion (Misc queries) 1 June 8th 05 03:08 AM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM
Advanced Filter Copy Paste Blank Line Hell :( Mike[_81_] Excel Programming 5 April 30th 04 11:41 PM


All times are GMT +1. The time now is 02:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"