VBA code to range of days
Closed
eunice3301
Posts
10
Registration date
Thursday 27 July 2017
Status
Member
Last seen
29 August 2017
-
Updated on Aug 1, 2017 at 05:59 PM
Blocked Profile - 3 Aug 2017 à 16:33
Blocked Profile - 3 Aug 2017 à 16:33
Related:
- VBA code to range of days
- Excel vba range find - Guide
- How to increase wifi range - Guide
- Cs 1.6 code - Guide
- Vba case like - Guide
- Excel add days to date - Guide
2 responses
OK, so you could have a BOOLEAN variable of SKIPIT. Initialize SKIPIT as boolean. Set SKIPIT as false. If the first logic test is true, have it change skipit to true. If skipit is true, have it jump to the next logic step, bypassing the duplicate check for EXPIRED, as we know it is almost expired. Be certain to re-initialize skiptit in between each logic test!
Something like:
It's kind of fun to do the impossible! -Walter Elias Disney
Something like:
If thisvariable <=30 then
variableOne=1
SKIPIT=true
end if
if SKIPIT=true then goto NEXTCHECK
If thisvariable <=0 then
variableOne=0
SKIPIT=true
end if
if SKIPIT=true then goto NEXTCHECK
:nextcheck
Here is the rest of the code that was run instead of checking on the variableOne!
It's kind of fun to do the impossible! -Walter Elias Disney
eunice3301
Posts
10
Registration date
Thursday 27 July 2017
Status
Member
Last seen
29 August 2017
3 Aug 2017 à 09:48
3 Aug 2017 à 09:48
Hello Acemark,
Got the code...=) i just added this in the code
For r = 2 To 53
If Range("I" & r).Value <= 30 And Range("I" & r).Value >= 1 And Range("L2").Value >= Range("I" & r).Value Then
MsgBox Range("B" & r).Value & " EID almost expired"
End If
It works for now hehehe =)
Thank you
Got the code...=) i just added this in the code
For r = 2 To 53
If Range("I" & r).Value <= 30 And Range("I" & r).Value >= 1 And Range("L2").Value >= Range("I" & r).Value Then
MsgBox Range("B" & r).Value & " EID almost expired"
End If
It works for now hehehe =)
Thank you
2 Aug 2017 à 02:28
Thank you so much for the help but i don't know how to use your code =)
I am very new in vba and macro and i have zero knowledge. I just manage to find the code in the web and modify it and gladly it works =) ... please be patient with me, can you explain where can i add the code you have suggested in my existing code? Please help.
Thank you so much =)