bnageshrao
Programmer
I have a spread sheet which has about 999 rows. User keeps typing in the data in the columns. At any time if they want to take a print out of the spread sheet the logic is as follows.
We have to find out the last row in which they have entered the value in the first column and then print from 1st row until that row in which they have data in the first column of whatever row it may be. Suppose if they have first column in 26th row then the Print area will be ActiveSheet.PageSetup.PrintArea = "$A$1:$L$26" or ActiveSheet.PageSetup.PrintArea = "$A$1:$L$47" if they have data in the 1st column of 47th row. I can write a loop to find which is the last row has value in first column. Once I find out how do you pass on that variable row number as the number for the last column in that row. For eg if there is a data in 26th row I should be able to say it is $L$26, or if there is a data in 47th row I should be able to say it is $L$47, and so on. $A$1 is always the starting column but the other column varies depending on the value in the first column of the row. When I got the row number I triede to concat that with L but had some problems. Any help is appreciated.
We have to find out the last row in which they have entered the value in the first column and then print from 1st row until that row in which they have data in the first column of whatever row it may be. Suppose if they have first column in 26th row then the Print area will be ActiveSheet.PageSetup.PrintArea = "$A$1:$L$26" or ActiveSheet.PageSetup.PrintArea = "$A$1:$L$47" if they have data in the 1st column of 47th row. I can write a loop to find which is the last row has value in first column. Once I find out how do you pass on that variable row number as the number for the last column in that row. For eg if there is a data in 26th row I should be able to say it is $L$26, or if there is a data in 47th row I should be able to say it is $L$47, and so on. $A$1 is always the starting column but the other column varies depending on the value in the first column of the row. When I got the row number I triede to concat that with L but had some problems. Any help is appreciated.