Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I want to write to an excel file that already has data in it using matlab
xlswrite function. I found that I can write to the excel file without overwriting information that is already there. So I was wondering if there is a way in excel to retrieve the address or index of the last cell containing data. |
#2
![]() |
|||
|
|||
![]()
Nancy
There are several ways of doing this depending on the layout of your data. Say you have data in all the cells of A1:A10. No blank cells in that range. You can use: LastCellAddress = Range("A1").End(xlDown).Address(0,0) This will give the address of A10. If you have blank cells in your data and you want to find the address of the last occupied cell, use: LastCellAddress = Range("A" & Rows.Count).End(xlUp).Address(0,0) HTH Otto "Nancy" wrote in message ... I want to write to an excel file that already has data in it using matlab xlswrite function. I found that I can write to the excel file without overwriting information that is already there. So I was wondering if there is a way in excel to retrieve the address or index of the last cell containing data. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Maintaining cell reference after sorting | Excel Discussion (Misc queries) | |||
How do I get one cell to record the time another cell was changed. | Excel Discussion (Misc queries) | |||
Change Axes Scale Dynamically | Charts and Charting in Excel | |||
Display actual contents of cell | Excel Discussion (Misc queries) | |||
copy a cell value not its function | Excel Discussion (Misc queries) |