$$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread tangledweb
Sigh, the things I know I don't know are increasing faster than the things I know. I get a 1004 error on the assignment to stoprowdata below. Sheets(RawData) has been used successfully before so I do not think that is wrong. So I assume the problem is in the rest of the statement. But if so

Re: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread Domain Admin
In this case it will be impossible for the match function to not find a match but thanks. No idea on why the assignment to stoprawdata fails? On Sat, Apr 7, 2012 at 1:17 PM, Rajan_Verma rajanverma1...@gmail.com wrote: If match function dost not find any value it return an error , to escape

RE: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread Rajan_Verma
In this case match function will return a result if it value match in range, but it will not return an error if values does not match in Range.. On Error is just to escape from error.. Rajan. -Original Message- From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]

Re: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread Domain Admin
I am not worried about the match function not finding a match, assuming the match line of code is written correctly. It is impossible to not have a match. If the code is incorrect anything can happen. But forget the match function for now. Do you have any idea why this code gives error 1004

Re: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread dguillett1
Provide a file with examples Don Guillett Microsoft MVP Excel SalesAid Software dguille...@gmail.com -Original Message- From: Domain Admin Sent: Saturday, April 07, 2012 3:42 PM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ runtime error on assignment trying to find

Re: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread Domain Admin
I solved the problem of the runtime error. Now it is the problem in the other thread where the returned value is the total row count of the spreadsheet instead of just the part with data. Does format setting in a cell really make that cell part of usedrange? On Sat, Apr 7, 2012 at 2:53 PM,

RE: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread Asa Rossoff
integer type only goes to 32768 - use long -Original Message- From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of dguillett1 Sent: Saturday, April 07, 2012 2:53 PM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ runtime error on

Re: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread Domain Admin
I made that change which is how I got to the current problem of 99 Integer should have been plenty if the usedrange was returning the actual used range. On Sat, Apr 7, 2012 at 3:18 PM, Asa Rossoff a...@lovetour.info wrote: integer type only goes to 32768 - use long -Original

RE: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread Asa Rossoff
.UsedRange.Offset(-1) What range would that be?? UsedRange always starts in A1 and end in the last lower right cell for which Excel has data or formats. Offset returns a range shifted by a certain number of rows and/or columns. If UsedRange = [A1:C10] UsedRange.Offset(-1) = [A0:C9] Of course

Re: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread Domain Admin
I fixed this. This thread should die now. On Sat, Apr 7, 2012 at 3:28 PM, Asa Rossoff a...@lovetour.info wrote: .UsedRange.Offset(-1) What range would that be?? UsedRange always starts in A1 and end in the last lower right cell for which Excel has data or formats. Offset returns a range

Re: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread dguillett1
Provide a file with examples Don Guillett Microsoft MVP Excel SalesAid Software dguille...@gmail.com -Original Message- From: Domain Admin Sent: Saturday, April 07, 2012 5:20 PM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ runtime error on assignment trying to

Re: $$Excel-Macros$$ runtime error on assignment trying to find the end of a column. Seems like should be simple.

2012-04-07 Thread Domain Admin
Thanks but this thread is solved/ended On Sat, Apr 7, 2012 at 4:27 PM, dguillett1 dguille...@gmail.com wrote: Provide a file with examples Don Guillett Microsoft MVP Excel SalesAid Software dguille...@gmail.com -Original Message- From: Domain Admin Sent: Saturday, April 07,