Take a look at these and read the comments.
Sub StrSubTest
Dim s As String
Dim sNew As String
Dim sNewDates As String
sNewDates = "D1, D2"
sNewDates = InputBox ("Please enter Date Cells Example D2,D1:")
' Assume for a moment that you do want to do a simple string substitution.
I think that the correct answer is that you simply write your own function.
That way you do not need to copy the long messy function and replace some text.
Based on what you just said, however, assume that the intent is that you will
modify the active cell to refernece the values in
Might I ask what you want the macro to do? Your macro confuses me a bit...
That said, the actual API has a very harsh learning curve (in my opinion). If I
rip apart what I see, I would guess the following:
The user enters some text, which represents a set of cells separated by a
comma.
Basically, I want the macro to be able to work completely on its own.
Agree that having to do the steps with the F2 and other keys is a problem.
Not sure why the recorder refuses to record those steps??
The original formula is
=IF(DATEDIF(A2,A1,y),IF(DATEDIF(A2,A1,y)=1,1
Had a sheet that has two dates and calculate the difference between the
dates.
07/05/2020
04/11/1960
60 Years 2 Months 24 Days
The formula being:
=IF(DATEDIF(A2,A1,y),IF(DATEDIF(A2,A1,y)=1,1
Year,DATEDIF(A2,A1,y)Years),)IF(MOD(DATEDIF(A2,A1,m),12),IF(MOD(DATEDIF(A2,A1,m),12)=1,1
Been doing a lot of googling, but finding lots of stuff, but nothing that works?
Have done a lot of versions and this is the latest one.
The record process does not allow for the use of the F2 key, so as is, it
results in the original args1(0).Value being in the cell?
After the macro ends, I've
Hi Michael,
your post is hard to understand. Please write, what you want to achieve
with your macro.
Kind regards
Regina
Michael D. Setzer II schrieb am 05-Jul-20 um 00:30:
Been doing a lot of googling, but finding lots of stuff, but nothing that works?
Have done a lot of versions and this