Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Value extraction problem

I got the code below to work. However I am having problems changing
the
code to fit my cell criteria/range. I've played around with this one
for quite some time, and the places that I would normally make changes
to the range doesn't seem to work.


Instead of A:A to B:B. .....I need this code to reflect B12:B3000 to
L12:L3000

Thanx


Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRow As Long
If Target.Cells.Count 1 Then Exit Sub
If Target.Column < 1 Then Exit Sub


Application.EnableEvents = False
If Application.CountIf(Range("B:B"), Target.Value) = 0 Then
Range("B65536").End(xlUp)(2).Value = Target.Value
End If


For myRow = Range("B65536").End(xlUp).Row To 2 Step -1
If IsError(Application.Match(Cells(myRow, 2).Value, Range("A:A"),
False)) Then
Cells(myRow, 2).ClearContents
End If


Next myRow


Application.EnableEvents = True


End Sub

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
Extraction Martina Excel Worksheet Functions 4 May 24th 07 04:48 AM
Data Extraction Problem RD Wirr Excel Worksheet Functions 4 March 2nd 07 11:21 PM
Data Extraction Problem Duke Carey Excel Worksheet Functions 0 February 28th 07 02:49 PM
Data Extraction Problem RD Wirr Excel Worksheet Functions 0 February 28th 07 02:46 PM
Data Extraction Problem Duke Carey Excel Worksheet Functions 0 February 28th 07 02:11 PM


All times are GMT +1. The time now is 07:20 AM.

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"