Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting data
Hi all,
I am trying to export data through the means of a button placed in excel, where the macro will copy 2 cells and paste it onto another spreadsheet. This is not where I need the help, what I am finding difficulty doing is having the macro not overwrite existing imported data on the other spreasheet. I want the macro to actually build up a database the another spreadsheet...if that makes sense. I am aware of the wiazrd template, but I don't want to take that approach. Is there a way to give the macro logic in saying if cell x and cell x is populated then paste data in cell x and cell x, preferably the row below existing data. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting data
To shorten up your question are you looking to find the first blank row and
paste your data there? if so then you might be able to do something like range("A65535").end(xlUp).offset(1,0).select to select the first blank cell in column A. HTH "Jane" wrote: Hi all, I am trying to export data through the means of a button placed in excel, where the macro will copy 2 cells and paste it onto another spreadsheet. This is not where I need the help, what I am finding difficulty doing is having the macro not overwrite existing imported data on the other spreasheet. I want the macro to actually build up a database the another spreadsheet...if that makes sense. I am aware of the wiazrd template, but I don't want to take that approach. Is there a way to give the macro logic in saying if cell x and cell x is populated then paste data in cell x and cell x, preferably the row below existing data. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting data
What you need to do is test the range where you wish to write new data, and
find the last row. The following code can be used to get the last row from a worksheet using the specified column. So in the example lastrow will contain the last row on the worksheet called "Store" in column A being empty. All you need to do is refer to the lastrow + 1 as the location to place your new data. Dim lastrow As Long lastrow = Worksheets("Store").Cells(Rows.Count, "A").End(xlUp).Row -- Cheers Nigel "Jane" wrote in message ... Hi all, I am trying to export data through the means of a button placed in excel, where the macro will copy 2 cells and paste it onto another spreadsheet. This is not where I need the help, what I am finding difficulty doing is having the macro not overwrite existing imported data on the other spreasheet. I want the macro to actually build up a database the another spreadsheet...if that makes sense. I am aware of the wiazrd template, but I don't want to take that approach. Is there a way to give the macro logic in saying if cell x and cell x is populated then paste data in cell x and cell x, preferably the row below existing data. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Exporting data from one .xls to another | Excel Discussion (Misc queries) | |||
Exporting Value Data | Excel Discussion (Misc queries) | |||
Exporting Data | Excel Discussion (Misc queries) | |||
exporting data | Excel Discussion (Misc queries) | |||
Exporting data | Excel Programming |