Related:
- Returning contents of last cell in row
- Saints row 2 cheats - Guide
- Call of duty: black ops – zombies downloadable content - Download - Shooters
- Clear only the formatting from the selected cell (leaving the content) - Guide
- How to delete a row in a table in word - Guide
- If cell contains date then return value - Excel Forum
4 responses
Ivan-hoe
Posts
433
Registration date
Saturday February 16, 2008
Status
Member
Last seen
October 17, 2008
110
Oct 1, 2008 at 04:01 PM
Oct 1, 2008 at 04:01 PM
Hello Rebecca,
to make the program return the data in the cell, use .Value
e.g. :
ou can also write
Ivan
to make the program return the data in the cell, use .Value
e.g. :
Dim LastCol1 as Double Dim MyVariable LastCol1 = Range("IV3").End(xlToLeft).Column MyVariable = Cells(3,LastCol1).Value MsgBox MyVariable
ou can also write
MyVariable = Range("IV3").End(xlToLeft).Value
Ivan
im new to this but i would suggest you use the variable to find the last cell. say you called this variable
Dim lastcellcount
you could then use the msg function and the .show
for example
msgbox lastcellcount.show
so it would look like this
Dim lastcellcount
lastcellcount = (maybe use your previous example)
msgbox lastcellcount.show
Dim lastcellcount
you could then use the msg function and the .show
for example
msgbox lastcellcount.show
so it would look like this
Dim lastcellcount
lastcellcount = (maybe use your previous example)
msgbox lastcellcount.show
hi ive looked at it a bit and come up with this
Dim numberofentries
numberOfTimeSheets = ActiveWorkbook.Worksheets.Count
If numberOfTimeSheets > 0 Then
Set myWorksheet = ActiveWorkbook.Worksheets.Item(numberofentries)
MsgBox "The contents of the last cell is " &_
myWorksheet.((name of the column containing the data)) & "."
End If
If numberOfTimeSheets = 0 Then
MsgBox "There is no contents."
End If
Dim numberofentries
numberOfTimeSheets = ActiveWorkbook.Worksheets.Count
If numberOfTimeSheets > 0 Then
Set myWorksheet = ActiveWorkbook.Worksheets.Item(numberofentries)
MsgBox "The contents of the last cell is " &_
myWorksheet.((name of the column containing the data)) & "."
End If
If numberOfTimeSheets = 0 Then
MsgBox "There is no contents."
End If