ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using CTRL+END when number of rows (https://www.excelbanter.com/excel-programming/360401-using-ctrl-end-when-number-rows.html)

Andries

Using CTRL+END when number of rows
 
Hello,
Who can help me out on this one?

I have a file with about 12,000 loans. However the amount differs from month
to month. Because I only need about 300 of them for my porpose, I delete al
the other rows. I also delete a number of columns and I insert two new
columns with additional data using VLOOKUP. The number of columns is each
month the same (=7). As all these steps are the same each month I recorded a
macro. At some point in this macro I want to go to the cel at the last row
with data left and the most right column with data. When I use <Ctrl+<End,
Excel brings me to row 12,000, but the bottomrow filled with data is about
300.
* is there on other command I can use?
* is there a line of VBA-code available which can bring me to the right cel?
* preferally I want all steps in the macro

I hope for your help!

Ciao,
Andries



Bob Phillips[_14_]

Using CTRL+END when number of rows
 
You could calculate the last filled row with this code

iLastRow = Cells(Rows.Count,"A").End(xlUp).Row

and then use this value when processing the data.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Andries" wrote in message
. nl...
Hello,
Who can help me out on this one?

I have a file with about 12,000 loans. However the amount differs from

month
to month. Because I only need about 300 of them for my porpose, I delete

al
the other rows. I also delete a number of columns and I insert two new
columns with additional data using VLOOKUP. The number of columns is each
month the same (=7). As all these steps are the same each month I recorded

a
macro. At some point in this macro I want to go to the cel at the last row
with data left and the most right column with data. When I use

<Ctrl+<End,
Excel brings me to row 12,000, but the bottomrow filled with data is about
300.
* is there on other command I can use?
* is there a line of VBA-code available which can bring me to the right

cel?
* preferally I want all steps in the macro

I hope for your help!

Ciao,
Andries





Patricia Shannon

Using CTRL+END when number of rows
 
You need to delete the unused rows and columns using Edit/delete.
Then do a Save. Sometimes I need to do a Save As to get it to reset.
If you delete using the Delete key, you are only deleting the values and
formulas, not the actual cells, and Excel will still consider them part of
your spreadsheet.

"Andries" wrote:

Hello,
Who can help me out on this one?

I have a file with about 12,000 loans. However the amount differs from month
to month. Because I only need about 300 of them for my porpose, I delete al
the other rows. I also delete a number of columns and I insert two new
columns with additional data using VLOOKUP. The number of columns is each
month the same (=7). As all these steps are the same each month I recorded a
macro. At some point in this macro I want to go to the cel at the last row
with data left and the most right column with data. When I use <Ctrl+<End,
Excel brings me to row 12,000, but the bottomrow filled with data is about
300.
* is there on other command I can use?
* is there a line of VBA-code available which can bring me to the right cel?
* preferally I want all steps in the macro

I hope for your help!

Ciao,
Andries





All times are GMT +1. The time now is 07:26 PM.

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