ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Transfer Data to Customer Database (https://www.excelbanter.com/excel-programming/344747-transfer-data-customer-database.html)

TheRobsterUK[_6_]

Transfer Data to Customer Database
 

I'm trying to make a customer database where the user inputs some
details (ID, name, address etc) and then clicks a button and the data
is transferred to another table. Hopefully the diagram below will give
an idea what I mean:

http://www.sudsolutions.com/stuff/Excel_Table.JPG

But how do I get Excel to add the new customer details to the next
available empty slot?

I can get it to do it in a very basic way but it always has to select
the cells and for reasons I won't go into here it must do it without
having to actually select the cells in question.

I'm sure there's an easy VBA macro that could do this but I'm stumped.


Cheers
-Rob


--
TheRobsterUK


------------------------------------------------------------------------
TheRobsterUK's Profile: http://www.excelforum.com/member.php...fo&userid=9924
View this thread: http://www.excelforum.com/showthread...hreadid=482209


quartz[_2_]

Transfer Data to Customer Database
 
The following may work, you will need to adapt the cell ranges appropriately.
If your database is in a different sheet, include the sheet name in the
Destination range:

Range("B3:D3").Copy Destination:=Range("B65536:D65536").End(xlUp).Offs et(1, 0)

HTH/


"TheRobsterUK" wrote:


I'm trying to make a customer database where the user inputs some
details (ID, name, address etc) and then clicks a button and the data
is transferred to another table. Hopefully the diagram below will give
an idea what I mean:

http://www.sudsolutions.com/stuff/Excel_Table.JPG

But how do I get Excel to add the new customer details to the next
available empty slot?

I can get it to do it in a very basic way but it always has to select
the cells and for reasons I won't go into here it must do it without
having to actually select the cells in question.

I'm sure there's an easy VBA macro that could do this but I'm stumped.


Cheers
-Rob


--
TheRobsterUK


------------------------------------------------------------------------
TheRobsterUK's Profile: http://www.excelforum.com/member.php...fo&userid=9924
View this thread: http://www.excelforum.com/showthread...hreadid=482209



TheRobsterUK[_7_]

Transfer Data to Customer Database
 

Got it working with a slight change to the posted code.

Much appreciated Quartz. :)

-Rob


--
TheRobsterUK


------------------------------------------------------------------------
TheRobsterUK's Profile: http://www.excelforum.com/member.php...fo&userid=9924
View this thread: http://www.excelforum.com/showthread...hreadid=482209



All times are GMT +1. The time now is 01:40 AM.

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