Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
date/month problem
i have to link my workbook thru the vba code. The logic is
that i need to look for months. LIke if my worksheet is of may month then i need to link with a column of anohter workbook which is also may and likewise continue for forthcoming months. i search for may-04 in the workbook. My thought is what if the user changes May-04 to May'04 or any other format....! How to resolve this ambiguity...is there a way whereby i put a condition??? or do i need to write a lot of if condition's????????? any thots will be appreciated |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
date/month problem
You could test left and right,
If Left(ActiveSheet.Name, 3) = Format(Date, "mmm") And _ Right(ActiveSheet.Name, 2) = Format(Date, "yy") Then ' do it -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) wrote in message ... i have to link my workbook thru the vba code. The logic is that i need to look for months. LIke if my worksheet is of may month then i need to link with a column of anohter workbook which is also may and likewise continue for forthcoming months. i search for may-04 in the workbook. My thought is what if the user changes May-04 to May'04 or any other format....! How to resolve this ambiguity...is there a way whereby i put a condition??? or do i need to write a lot of if condition's????????? any thots will be appreciated |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
count month when date is in day/month/year format | Excel Worksheet Functions | |||
Problem Converting date to month in text for use in pivot table | Excel Worksheet Functions | |||
Date arithmetic: adding 1 month to prior end of month date | Excel Worksheet Functions | |||
Sort month/date/year data using month and date only | Excel Discussion (Misc queries) | |||
=VLOOKUP(1,Nationality!B5:B29,IF(MONTH(date)6,MONTH(date)-6, MON | Excel Worksheet Functions |