Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Verifying lines with other workbook

Hi

I am using Excel Programming to clean up and verify spreadsheets to prepare
them to be run on robot computer with a certain setup. The verification
involves various plans customers may have chosen and these plans are listed
in a file named plans.xls. The ones i have in the original file may be
entered incorrectly so they need to be verified that they are in fact a
valid plan before the file can loaded onto the robot. Could anyone please
explain the simplest way of doing this?

Also to determin how many lines there are in a spreadsheet I have used the
While value"" then linecount=linecount+1 in a For Next loop and simply
counting each line individually. Is there a quicker way to determine the
number of lines in a file?

Thanks in advance for your help

Charlotte


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.737 / Virus Database: 491 - Release Date: 11.08.2004


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Verifying lines with other workbook

set rng = Cells(rows.count,1).End(xlup)

msgbox rng.row

would tell you the last row with a filled cell in column 1

to validate the entry for plan, you can

Dim rng as range, cell as range, res a variant
With workbooks("Plan.xls").Worksheets(1)
set rng = .Range(.cells(1,1),.cells(1,1).end(xldown))
End with

With Activesheet
for each cell in .Range(.Cells(1,1),.Cells(1,1).End(xldown))
res = application.Match(cell,rng,0)
if iserror(res) then
' doesn't match a plan in Plan.xls
end if
Next
End With

--
Regards,
Tom Ogilvy




"Charlotte Hagen" wrote in message
...
Hi

I am using Excel Programming to clean up and verify spreadsheets to

prepare
them to be run on robot computer with a certain setup. The verification
involves various plans customers may have chosen and these plans are

listed
in a file named plans.xls. The ones i have in the original file may be
entered incorrectly so they need to be verified that they are in fact a
valid plan before the file can loaded onto the robot. Could anyone please
explain the simplest way of doing this?

Also to determin how many lines there are in a spreadsheet I have used the
While value"" then linecount=linecount+1 in a For Next loop and simply
counting each line individually. Is there a quicker way to determine the
number of lines in a file?

Thanks in advance for your help

Charlotte


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.737 / Virus Database: 491 - Release Date: 11.08.2004




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Verifying lines with other workbook

Oh, one more thing... I would also like to use the list in plans.xls to
generate the values of the ComboBox so the user has the option of correcting
the invalid plan. Could someone explain how I would import the plans on the
fly? The reason this needs to be done this way is that the plans may change
from time to time and updating the list is easier than modifiying the
script.

Thanks again!!!

Charlotte



"Charlotte Hagen" skrev i melding
...
Hi

I am using Excel Programming to clean up and verify spreadsheets to

prepare
them to be run on robot computer with a certain setup. The verification
involves various plans customers may have chosen and these plans are

listed
in a file named plans.xls. The ones i have in the original file may be
entered incorrectly so they need to be verified that they are in fact a
valid plan before the file can loaded onto the robot. Could anyone please
explain the simplest way of doing this?

Also to determin how many lines there are in a spreadsheet I have used the
While value"" then linecount=linecount+1 in a For Next loop and simply
counting each line individually. Is there a quicker way to determine the
number of lines in a file?

Thanks in advance for your help

Charlotte


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.737 / Virus Database: 491 - Release Date: 11.08.2004




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.737 / Virus Database: 491 - Release Date: 11.08.2004


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Verifying lines with other workbook

for an activeX combobox on a userform:

With workbooks("Plans.xls").Worksheets(1)
set rng = .Range(.cells(1,1),.cells(1,1).end(xldown))
End with
Combobox1.rowSource = rng.Address(external:=True)

--
Regards,
Tom Ogilvy

"Charlotte Hagen" wrote in message
...
Oh, one more thing... I would also like to use the list in plans.xls to
generate the values of the ComboBox so the user has the option of

correcting
the invalid plan. Could someone explain how I would import the plans on

the
fly? The reason this needs to be done this way is that the plans may

change
from time to time and updating the list is easier than modifiying the
script.

Thanks again!!!

Charlotte



"Charlotte Hagen" skrev i melding
...
Hi

I am using Excel Programming to clean up and verify spreadsheets to

prepare
them to be run on robot computer with a certain setup. The verification
involves various plans customers may have chosen and these plans are

listed
in a file named plans.xls. The ones i have in the original file may be
entered incorrectly so they need to be verified that they are in fact a
valid plan before the file can loaded onto the robot. Could anyone

please
explain the simplest way of doing this?

Also to determin how many lines there are in a spreadsheet I have used

the
While value"" then linecount=linecount+1 in a For Next loop and simply
counting each line individually. Is there a quicker way to determine the
number of lines in a file?

Thanks in advance for your help

Charlotte


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.737 / Virus Database: 491 - Release Date: 11.08.2004




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.737 / Virus Database: 491 - Release Date: 11.08.2004




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
Look up a value from a row after verifying two other values Paul W Excel Worksheet Functions 11 September 1st 08 08:59 PM
Verifying value of a cell El Criollo Excel Discussion (Misc queries) 7 December 12th 06 10:21 AM
Verifying Dates gilbert Excel Worksheet Functions 1 September 8th 05 03:22 AM
Verifying all data in each row is filled in John[_86_] Excel Programming 1 June 9th 04 11:45 PM
verifying date MacroMan Excel Programming 0 July 30th 03 10:38 PM


All times are GMT +1. The time now is 12:57 PM.

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"