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

Hello,

I currently have a module that I created that reads a text file, parses it,
saves it as a temporary workbook, processes it and then saves a final
version. Works great.

However, there are four codes that I need to look for in my processing.
These codes are hard coded into a For-Next Loop:

For x = 1 To EndRow
Cells(y, 1).Select
If Cells(y, 1).Value Like "174*" Or _
Cells(y, 1).Value Like "175*" Or _
Cells(y, 1).Value Like "172*" Or _
Cells(y, 1).Value Like "173*" Or _
Cells(y, 1).Value Like "399*" 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


To reduce the number of times I need to touch the code, my team wants me to
create an Excel table and enter values into that table. I would then run the
code and process for values retrieved from the table. that way the code
stays in place and I can just add/delete values as needed.

Question: How would I read values into a FOR-NEXT loop from an Excel Table?
Do I create an array?

Any ideas would definitely be appreciated.

Thanks,

Tony

 
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 08:46 AM.

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

About Us

"It's about Microsoft Excel"