Auto fill last cell in column on open Excel worksheet?
-
I have this macro for saving the excel file as last cell completed in column A when I close the file: Sub Auto_Close() ActiveWorkbook.SaveAs Filename:= _ "C:\excel\" & Range("A65536").End(xlUp) & ".xls" End Sub Now, I'd like to modify this macro because I'd like the last blank cell in column A to be filled automaticaly relating to another filled cell in the worksheet when I open the file. For example: Column B contains filled cells. On opening my file, the last blank cell in column A (let's say cell A1) must be filled automaticaly with the content of a cell in column B (let's say cell B2) Than I close the worksheet and it is saved automaticaly as the content of A1. On next opening the worksheet, cell A2 must be filled automaticaly with the content of the next cell in column B, in this case cell B3. On closing the worksheet, it will be saved as A2 content. And this should repeat on and on, until the column B content ends. Another way to do this should be more simple: saving my worksheet automaticaly with the next cell filled in column A. So I shouldn't enter manualy the content of the cell, but the cell should be completed previously.
-
Answer:
As I answered your previous question, providing you with the macro you are using, so shall I answer this question. Here is the macro that will, upon opening the workbook, select the next available cell in column A, and copy the value from the equivalent cell in column B. Note: you may have to change the "Sheet1" reference to the sheet name you are using for this routine. Sub Auto_Open() Sheets("Sheet1").Select Range("A65536").End(xlUp).Offset(1, 0).Value = _ Range("B65536").End(xlUp).Value End Sub
emilopre... at Yahoo! Answers Visit the source
Related Q & A:
- How to open Excel sheet with full access in c#?Best solution by Stack Overflow
- How to update an open Excel in C# using OLEDB?Best solution by stackoverflow.com
- Can you use auto fill in yahoo mail?Best solution by Yahoo! Answers
- How do I put auto fill in toolbar?Best solution by answers.microsoft.com
- How do I get "auto fill" on my computer?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.