ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VBA macro - need to edit code to skip a year (https://www.excelbanter.com/excel-programming/293852-excel-vba-macro-need-edit-code-skip-year.html)

adun3434

Excel VBA macro - need to edit code to skip a year
 
I need to edit a piece of code in a VBA macro to make it look for
specific year within two different ranges.

I currently have:
Case "12391"
sDesc = "SOUTH CAROLINA"
sYear = "1970"
fYear = "2000"
Case "12401"
sDesc = "SOUTH DAKOTA"
sYear = "1970"
fYear = CStr(Year(Now))

I need to skip 2001-2002 and have it continue looking for 2003 t
present for "SOUTH CAROLINA" only. In other words, the range for Sout
Carolina would be 1970 thru 2000 and 2002 thru present.

Thank you in advance for your assistance.

Angel

--
Message posted from http://www.ExcelForum.com



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

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