ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   get value from cell (https://www.excelbanter.com/excel-programming/317504-get-value-cell.html)

No Name

get value from cell
 
How do I get a value from a cell (A1) what I want is the day of a date from
the cell to add one ot it and put it back.
thanks all



Norman Jones

get value from cell
 
Hi ,

Not being sure what you want, here are three alternative offerings:

Sub Tester01()
'Increase the date in A1 by 1
With Range("A1")
.Value = .Value + 1
End With
End Sub

Sub Tester02()
'Convert A1 to a weekday and increase by 1
With Range("A1")
.Value = Format(.Value + 1, "dddd")
End With
End Sub

Sub Tester03()
'Increase the date by 1 and show the weekday
With Range("A1")
.Value = Format(.Value + 1, "dddd mm/dd/yy")
End With
End Sub

If none of these does what you want, post back.

---
Regards,
Norman



wrote in message ...
How do I get a value from a cell (A1) what I want is the day of a date
from the cell to add one ot it and put it back.
thanks all




DMoney

get value from cell
 
This should do it.

Dim a As Date
a = Range("a1").Value + 1
Range("A1") = a

" wrote:

How do I get a value from a cell (A1) what I want is the day of a date from
the cell to add one ot it and put it back.
thanks all





All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com