LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Read values from an Excel Table?

Perfect. On the mark! It worked perfectly.

Thanks!

Tony


"merjet" wrote:

"Excel Table" is not very specific. Assuming it refers to a Range on a
worksheet other than the active one, you could do something like the
following. Such Range likely should not be on the ActiveSheet since
the code deletes rows.

Sub Test()
Dim bFlag As Boolean
Dim c As Range
Dim rng As Range

y = ActiveSheet.Range("A1").End(xlDown).Row
EndRow = y
Set rng = Sheets("Sheet2").Range("A1:A5")
For y = 1 To EndRow
Cells(y, 1).Select
bFlag = False
For Each c In rng
If Cells(y, 1).Value Like c Then
bFlag = True
End If
Next c
If bFlag = True Then
y = y + 1
Else
Cells(y, 1).Select
Selection.Delete Shift:=xlUp
If ActiveCell.Row 1 Then
ActiveCell.Offset(-1, 0).Select
End If
End If
Next
End Sub

Hth,
Merjet



 
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
Can I read a range of scenario (input) values from a table? hilton Excel Discussion (Misc queries) 0 March 11th 10 09:31 AM
Read Excel row values shantanu Excel Worksheet Functions 4 November 28th 07 08:03 AM
read the values from a excel row shantanu Excel Worksheet Functions 2 July 13th 07 09:22 AM
Excel-read a table DHS64 Excel Worksheet Functions 1 September 26th 05 09:37 PM
Read EXCEL table Roberto Cortiana Excel Programming 2 December 30th 04 04:15 PM


All times are GMT +1. The time now is 01:31 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"