All help is worthy

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

I have set up a simple database in excel, using barcodes (i found this
easier to scan and lookup, than access) plus the people working with
this will find it simple to use. I have however reached a giant full
stop.
The database is pulled from Dave Peterson's update log worksheet, which
works very well, the problems is that on a lookup sheet( using Vlookup
) where the user scans the barcode it will pull all info from the
"database" sheet in reference to the barcode, ie: barcode number,
surname,forename,address, early greenfees purchased,mid purchased,late.
Is it possible to manipulate early, mid and late and return the new
values to overwrite the existing?
Any help will be thankful
 
Robert,

You could use code like this to store your modified data. With a cell selected on the row with the
modified data, and the key in column A, and your Database on a sheet named DataBase:

Dim myRow As Long

With Worksheets("DataBase")
myRow = Application.Match(Cells(ActiveCell.Row,1).Value, .Range("A:A"), False)
.Cells(myRow,2).Value = Cells(ActiveCell.Row,2).Value
.Cells(myRow,3).Value = Cells(ActiveCell.Row,3).Value
.Cells(myRow,4).Value = Cells(ActiveCell.Row,4).Value
'Etc...
End With

Of course, you might need to format the data, and use error checking, etc.
to tell when you are modifying existing data versus adding new data...

HTH,
Bernie
MS Excel MVP
 
Thanks Bernie
this code is great
thank you

Bernie said:
Robert,

You could use code like this to store your modified data. With a cell selected on the row with the
modified data, and the key in column A, and your Database on a sheet named DataBase:

Dim myRow As Long

With Worksheets("DataBase")
myRow = Application.Match(Cells(ActiveCell.Row,1).Value, .Range("A:A"), False)
.Cells(myRow,2).Value = Cells(ActiveCell.Row,2).Value
.Cells(myRow,3).Value = Cells(ActiveCell.Row,3).Value
.Cells(myRow,4).Value = Cells(ActiveCell.Row,4).Value
'Etc...
End With

Of course, you might need to format the data, and use error checking, etc.
to tell when you are modifying existing data versus adding new data...

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top