vitorpadovam
New Member
- Joined
- Jun 9, 2015
- Messages
- 2
Hi guys,
I've been trying to do this by myself but no luck so far.
I have two sheets one that works like a database and the other that is used to "feed" this database.
On the feed sheet I want to add to the "title" of the data beeing fed it's ID number. This ID number needs to be defined based on the max value of a column located in the database sheet (so it can remain in sequential order).
Below is the code that I am trying to use:
Sub Num_MTR()
NUMB = Application.WorksheetFunction.Max(Worksheets("CONTROLE").Columns("0")) 'Sheet "CONTROLE"is the database one.
Sheets("MTR").Select
Range("C1").Select = "MANIFESTO DE TRANSPORTE DE RESÍDUOS Nº " & NUMB 'Sheet "MTR" the one being fed.
End Sub
Trying to elaborate a bit more. I want cell C1 on MTR sheet to display the text "MANIFESTO DE TRANSPORTE DE RESÍDUOS Nº " along with the value of the variable NUMB.
Thanks for helping!! Sorry about the portuguese on the sheet names and etc.
I've been trying to do this by myself but no luck so far.
I have two sheets one that works like a database and the other that is used to "feed" this database.
On the feed sheet I want to add to the "title" of the data beeing fed it's ID number. This ID number needs to be defined based on the max value of a column located in the database sheet (so it can remain in sequential order).
Below is the code that I am trying to use:
Sub Num_MTR()
NUMB = Application.WorksheetFunction.Max(Worksheets("CONTROLE").Columns("0")) 'Sheet "CONTROLE"is the database one.
Sheets("MTR").Select
Range("C1").Select = "MANIFESTO DE TRANSPORTE DE RESÍDUOS Nº " & NUMB 'Sheet "MTR" the one being fed.
End Sub
Trying to elaborate a bit more. I want cell C1 on MTR sheet to display the text "MANIFESTO DE TRANSPORTE DE RESÍDUOS Nº " along with the value of the variable NUMB.
Thanks for helping!! Sorry about the portuguese on the sheet names and etc.