Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default saving fcell contents in a separate list

Can anyone help.

I have a spreadsheet containing information on one
customer in several cells. this spreadsheet is used for
each new customer contact. I would like to save the info
in this documnet in a separate spreadsheet with all the
cell information in one row as shown below.

Document 1

Customer: Cust 1

info 1 info 3

Info 2 info 4


Document 2


Cust 1 info1 info 2 info 3 info 4
Cust 2 info1 info 2 info 3 info 4
Cust 3 info1 info 2 info 3 info 4
Cust 4 info1 info 2 info 3 info 4

What I need is a progamming device on the first document
which will save the cell info into the second document in
the next availalbe row.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default saving fcell contents in a separate list

with worksheets("Sheet2")
set rng = .Cells(rows.count,1).End(xlup)(2)
End With

rng.Value = cust
rng.offset(0,1).Value = info1
rng.offset(0,2).Value = info2
rng.offset(0,3).Value = info3
rng.offset(0,4).Value = info4


change info1 to info4 with the actual cell references such as
worksheets("Sheet1").Range("B9")

--
Regards,
Tom Ogilvy

"jeremy" wrote in message
...
Can anyone help.

I have a spreadsheet containing information on one
customer in several cells. this spreadsheet is used for
each new customer contact. I would like to save the info
in this documnet in a separate spreadsheet with all the
cell information in one row as shown below.

Document 1

Customer: Cust 1

info 1 info 3

Info 2 info 4


Document 2


Cust 1 info1 info 2 info 3 info 4
Cust 2 info1 info 2 info 3 info 4
Cust 3 info1 info 2 info 3 info 4
Cust 4 info1 info 2 info 3 info 4

What I need is a progamming device on the first document
which will save the cell info into the second document in
the next availalbe row.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default saving fcell contents in a separate list

Thanks Tom,
I managed to arrange that to suit nicely. i now have a
command button that saves thecustomer info in a list in
sheet 2.Could you perhaps advise me as well how to avoid
saving duplicates of the customer details in the list???


-----Original Message-----
with worksheets("Sheet2")
set rng = .Cells(rows.count,1).End(xlup)(2)
End With

rng.Value = cust
rng.offset(0,1).Value = info1
rng.offset(0,2).Value = info2
rng.offset(0,3).Value = info3
rng.offset(0,4).Value = info4


change info1 to info4 with the actual cell references

such as
worksheets("Sheet1").Range("B9")

--
Regards,
Tom Ogilvy

"jeremy" wrote in

message
...
Can anyone help.

I have a spreadsheet containing information on one
customer in several cells. this spreadsheet is used for
each new customer contact. I would like to save the info
in this documnet in a separate spreadsheet with all the
cell information in one row as shown below.

Document 1

Customer: Cust 1

info 1 info 3

Info 2 info 4


Document 2


Cust 1 info1 info 2 info 3 info 4
Cust 2 info1 info 2 info 3 info 4
Cust 3 info1 info 2 info 3 info 4
Cust 4 info1 info 2 info 3 info 4

What I need is a progamming device on the first document
which will save the cell info into the second document

in
the next availalbe row.




.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default saving fcell contents in a separate list

Dim res as Variant
Dim rng as Range
Dim rng1 as Range
with worksheets("Sheet2")
set rng = .Cells(rows.count,1).End(xlup)(2)
set rng1 = .Range(.Cells(1,1),rng)
End With

res = Application.Match(cust,rng1,0)
if iserror(res) then
rng.Value = cust
rng.offset(0,1).Value = info1
rng.offset(0,2).Value = info2
rng.offset(0,3).Value = info3
rng.offset(0,4).Value = info4
End if

--
Regards,
Tom Ogilvy


"jeremy" wrote in message
...
Thanks Tom,
I managed to arrange that to suit nicely. i now have a
command button that saves thecustomer info in a list in
sheet 2.Could you perhaps advise me as well how to avoid
saving duplicates of the customer details in the list???


-----Original Message-----
with worksheets("Sheet2")
set rng = .Cells(rows.count,1).End(xlup)(2)
End With

rng.Value = cust
rng.offset(0,1).Value = info1
rng.offset(0,2).Value = info2
rng.offset(0,3).Value = info3
rng.offset(0,4).Value = info4


change info1 to info4 with the actual cell references

such as
worksheets("Sheet1").Range("B9")

--
Regards,
Tom Ogilvy

"jeremy" wrote in

message
...
Can anyone help.

I have a spreadsheet containing information on one
customer in several cells. this spreadsheet is used for
each new customer contact. I would like to save the info
in this documnet in a separate spreadsheet with all the
cell information in one row as shown below.

Document 1

Customer: Cust 1

info 1 info 3

Info 2 info 4


Document 2


Cust 1 info1 info 2 info 3 info 4
Cust 2 info1 info 2 info 3 info 4
Cust 3 info1 info 2 info 3 info 4
Cust 4 info1 info 2 info 3 info 4

What I need is a progamming device on the first document
which will save the cell info into the second document

in
the next availalbe row.




.



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
separate contents of one cell into multiple cells Horacio[_4_] Excel Worksheet Functions 4 January 24th 10 12:25 AM
How to separate the contents of one cell into two cells in Excel 2 AliBaba Excel Discussion (Misc queries) 1 May 21st 09 07:19 PM
Saving just 1 worksheet out of a workbook to a separate file Rich D Excel Discussion (Misc queries) 1 January 23rd 08 02:31 AM
Saving a sheet as a separate file Herren''s Excel Discussion (Misc queries) 2 March 30th 06 09:46 PM
how do i automatically archive old cell contents to a separate . Excel_nong Excel Discussion (Misc queries) 1 September 7th 05 01:43 PM


All times are GMT +1. The time now is 09:56 PM.

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"