BadgerMushroomSnake
New Member
- Joined
- Apr 5, 2017
- Messages
- 5
Hi everyone,
I have a pretty basic spreadsheet with 8 columns.
Data get added everyday (10 rows per day average)
I've done my research on internet but it seems to be rather difficult to find the info I would need. And I am pretty much a newbie.
I am trying to create a Macro linked to a button that will :
- Send an email to 5 persons that will always be the same (I think I can modify a code I have for that)
- The subject of the email should be "Cancellation - Cell Value of last row, column A - Cell Value of last row, column B"
- The body should be "Please cancel booking - Cell value of last row, column A"
Basically I need to refer to a specific cell in the last row with data.
I can only guess that I need an attribute to define the last row and then something like
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, 1).End(xlUp).Row
oMail.Subject = "Cancellation - " & Cell.Value(Lastrow, 1) & " - " & Cell.Value (Lastrow, 2)
I guess I am all wrong, could you help me or redirect me to an article/video/... ?
Thank you for your help!
I have a pretty basic spreadsheet with 8 columns.
Data get added everyday (10 rows per day average)
I've done my research on internet but it seems to be rather difficult to find the info I would need. And I am pretty much a newbie.
I am trying to create a Macro linked to a button that will :
- Send an email to 5 persons that will always be the same (I think I can modify a code I have for that)
- The subject of the email should be "Cancellation - Cell Value of last row, column A - Cell Value of last row, column B"
- The body should be "Please cancel booking - Cell value of last row, column A"
Basically I need to refer to a specific cell in the last row with data.
I can only guess that I need an attribute to define the last row and then something like
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, 1).End(xlUp).Row
oMail.Subject = "Cancellation - " & Cell.Value(Lastrow, 1) & " - " & Cell.Value (Lastrow, 2)
I guess I am all wrong, could you help me or redirect me to an article/video/... ?
Thank you for your help!