Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to use someting like the left command to identify the number to the
left of the first "/". My intent is to identify the month entered in a cell (first digit or two to the left of the first "/") so that I can then use if then statements to automatically identify the quarter that the date falls in. TIA Papa |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does that cell contain a date?
If yes, then how about: dim myMonth as Long mymonth = month(activesheet.range("A1").value Papa Jonah wrote: I want to use someting like the left command to identify the number to the left of the first "/". My intent is to identify the month entered in a cell (first digit or two to the left of the first "/") so that I can then use if then statements to automatically identify the quarter that the date falls in. TIA Papa -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok Dave,
I would try that. However, this is a column of dates. My original intent was to put this if then thing in the next column all the way down to apply to all the rows. How do I incorporate your code to work whenever the cell has a date entered or a date changed? I struggle with this after-update concept that I know how to use in Access. Do I need to do code in the worksheet upon opening it? Thanks "Dave Peterson" wrote: Does that cell contain a date? If yes, then how about: dim myMonth as Long mymonth = month(activesheet.range("A1").value Papa Jonah wrote: I want to use someting like the left command to identify the number to the left of the first "/". My intent is to identify the month entered in a cell (first digit or two to the left of the first "/") so that I can then use if then statements to automatically identify the quarter that the date falls in. TIA Papa -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel has its own =month() function.
Maybe you could just put in lots of formulas: =month(a1) or =if(a1="","",month(a1)) to not show 1 when A1 is empty. Papa Jonah wrote: Ok Dave, I would try that. However, this is a column of dates. My original intent was to put this if then thing in the next column all the way down to apply to all the rows. How do I incorporate your code to work whenever the cell has a date entered or a date changed? I struggle with this after-update concept that I know how to use in Access. Do I need to do code in the worksheet upon opening it? Thanks "Dave Peterson" wrote: Does that cell contain a date? If yes, then how about: dim myMonth as Long mymonth = month(activesheet.range("A1").value Papa Jonah wrote: I want to use someting like the left command to identify the number to the left of the first "/". My intent is to identify the month entered in a cell (first digit or two to the left of the first "/") so that I can then use if then statements to automatically identify the quarter that the date falls in. TIA Papa -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Type a symbol useing shortcut keys rather the insert a symbol | Excel Discussion (Misc queries) | |||
Euro symbol displays as dollar symbol in Excel | Excel Worksheet Functions | |||
SYMBOL ¦please help how do i do this symbol without copy/pasting i | Excel Worksheet Functions | |||
Move the negaive symbol from the right to the left side of a numbe | Excel Worksheet Functions | |||
I need a symbol but "symbol" in the Insert menu is grayed-out. | Excel Discussion (Misc queries) |