Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting data from one .xls to another RichardOxon Excel Discussion (Misc queries) 2 August 18th 06 11:33 AM
Exporting Value Data Brento Excel Discussion (Misc queries) 1 July 18th 06 01:28 PM
Exporting Data Brento Excel Discussion (Misc queries) 1 February 8th 06 02:20 PM
exporting data abbylulu2 Excel Discussion (Misc queries) 1 March 19th 05 10:25 AM
Exporting data Govind[_3_] Excel Programming 0 December 27th 03 11:40 AM


All times are GMT +1. The time now is 11:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"