ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select range using criteria (https://www.excelbanter.com/excel-programming/280151-select-range-using-criteria.html)

Eva Shanley[_2_]

Select range using criteria
 
Column B can have different line numbers keyed in such as
1, 2, 3. I need to import the rows of data to our Lawson
system by first creating a .txt file from Excel. However,
I need to hit 2 separate Lawson tables, the first table
needs all the Line #1 records, and the second needs all
the Line # greater than 1. How can I select a range
dependent on the line number? I looked at many of the
posts and VBA code but can't decide what I need to do.
Any help as always is much appreciated, and I really do
learn...just not as quickly as I'd like! TIA

Tom Ogilvy

Select range using criteria
 
Try looking at the Autofilter command. You would set the filter to show
just the records you want, then copy those to a new workbook (when you copy
a filtered range, buy default, only the visible rows are copied). You could
do a file saveas in that book to make a text file.

--
Regards,
Tom Ogilvy

"Eva Shanley" wrote in message
...
Column B can have different line numbers keyed in such as
1, 2, 3. I need to import the rows of data to our Lawson
system by first creating a .txt file from Excel. However,
I need to hit 2 separate Lawson tables, the first table
needs all the Line #1 records, and the second needs all
the Line # greater than 1. How can I select a range
dependent on the line number? I looked at many of the
posts and VBA code but can't decide what I need to do.
Any help as always is much appreciated, and I really do
learn...just not as quickly as I'd like! TIA




Eva Shanley[_2_]

Select range using criteria
 
Thanks Tom, you're right of course. I was thinking
copying filtered data would include the invisible rows;
this should work fine. Thanks again.

-----Original Message-----
Try looking at the Autofilter command. You would set

the filter to show
just the records you want, then copy those to a new

workbook (when you copy
a filtered range, buy default, only the visible rows are

copied). You could
do a file saveas in that book to make a text file.

--
Regards,
Tom Ogilvy

"Eva Shanley" wrote

in message
...
Column B can have different line numbers keyed in such

as
1, 2, 3. I need to import the rows of data to our

Lawson
system by first creating a .txt file from Excel.

However,
I need to hit 2 separate Lawson tables, the first table
needs all the Line #1 records, and the second needs all
the Line # greater than 1. How can I select a range
dependent on the line number? I looked at many of the
posts and VBA code but can't decide what I need to do.
Any help as always is much appreciated, and I really do
learn...just not as quickly as I'd like! TIA



.



All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com