How about a slightly different alternative?
Add another history sheet--but keep all the history (all the customers) on that
one sheet.
You can always use data|filter|autofilter (or data|sort) to show/group what you
want. And by having all the data in one spot, you can summarize stuff better.
It sounds like you could take the data off the first sheet (called "Input"???)
and plop it into the "Summary Sheet" via a macro:
Option Explicit
Sub testme01()
Dim historyWks As Worksheet
Dim inputWks As Worksheet
Dim nextRow As Long
Dim oCol As Long
Dim myRng As Range
Dim myAddresses As String
Dim myCell As Range
myAddresses = "A1,F9,A2,B1"
Set inputWks = Worksheets("Input")
Set historyWks = Worksheets("Summary")
With historyWks
nextRow = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Row
End With
With inputWks
Set myRng = .Range(myAddresses)
If Application.CountA(myRng) < myRng.Cells.Count Then
MsgBox "Please fill in all the cells!"
Exit Sub
End If
End With
With historyWks
With .Cells(nextRow, "A")
.Value = Now
.NumberFormat = "mm/dd/yyyy hh:mm:ss"
End With
.Cells(nextRow, "B").Value = Application.UserName
oCol = 3
For Each myCell In myRng.Cells
historyWks.Cells(nextRow, oCol).Value = myCell.Value
myCell.ClearContents 'clean it up???
oCol = oCol + 1
Next myCell
End With
End Sub
I check to see if all the cells have something in them (maybe not required???).
I also add the date/time to column A of the summary sheet and the username
(taken from Tools|options|General tab) to column B.
Then Column C to xxxx go in the same order as the addresses you've specified in
this line:
myAddresses = "A1,F9,A2,B1"
(Change that to match your input worksheet.
(mycell.clearcontents may not be necessary, too.)
mount_mordor wrote:
Hello
I have a quoting program in excel that I created, I use this program to
quote customers for laser cutting. It is fairly basic, on the first page
I input all the data required to determine the amount of the quote, such
as the customer, the material, the size of the part, the amount of
parts. The second page is a print page, set up to accordingly and
drawing all it's information from the 1st page. The third page is a
list of all my customers. On the 4th page is my current steel price
list. All of this works great so far, but the problem is this:
I need to "Record" all the quotes I make. What I would idealy like to
have is a different sheet for each customer, so that after I enter the
information in the first page that, and select the customer, I could
hit a button that would search for that customers "sheet" and copy the
information to a new row there.
I am not that well versed in excel, so please keep the answers simple.
TIA
Troy
--
mount_mordor
------------------------------------------------------------------------
mount_mordor's Profile: http://www.excelforum.com/member.php...o&userid=26879
View this thread: http://www.excelforum.com/showthread...hreadid=401134
--
Dave Peterson