Updating Vlookup chart.

  • Thread starter Thread starter HoundofCullin
  • Start date Start date
H

HoundofCullin

Ok... I've got a ticket sheet that the data in itis updated using th
Vlookup function to pull data from another sheet, then I press a butto
and it prints it out. What I need is to be able to fill out the ticke
the in the morning and use the macro that prints the ticket out, the
transfers the data into a special log I created. I would for the dat
to, once I update it, to save the values in my Vlookup sheet so tha
when next I enter the Truck's Number in the appropriate cell i
automatically fills it the sheet once again.

Is this possible without creating a whole new button
 
Hello

Yes it is but it needs a macro. You would need to supply
more details before anyone could help with this.

Regards
Peter
 
Not exactly sure what you mean, but you could add something like this
code to your existing macro to transfer information to your log.

Presumably you mean you want to access this log by entering a number in
a cell in a worksheet.
That is easy because all you need is a set of VLOOKUPs to refer to that
cell.

'-------------------------------------------------
'- Transfer current row to bottom of another worksheet
'- BrianB
Sub TRANSFER_ROW()
Dim Fromsheet As Worksheet
Dim FromRow As Long
Dim Numcols As Integer
Dim ToSheet As Worksheet
Dim ToRow As Long
Dim CopyRange As Range
'-----------------------
'- destination
Set ToSheet = Workbooks("Book2.xls").Worksheets("Sheet1")
ToRow = ToSheet.Range("A65536").End(xlUp).Row + 1
'---------------------------------
'- current row
Set Fromsheet = ActiveSheet
FromRow = ActiveCell.Row
Numcols = ActiveSheet.Range("IV" & FromRow).End(xlToLeft).Column
Set CopyRange = Fromsheet.Range(Cells(FromRow, 1), Cells(FromRow,
Numcols))
CopyRange.Copy Destination:=ToSheet.Range("A" & ToRow)
End Sub
'--- eop -------------------------------------------------
 

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