Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default left of symbol

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default left of symbol

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default left of symbol

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default left of symbol

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Type a symbol useing shortcut keys rather the insert a symbol RJD Excel Discussion (Misc queries) 2 December 23rd 09 06:28 PM
Euro symbol displays as dollar symbol in Excel BrendaM Excel Worksheet Functions 5 April 24th 09 03:43 PM
SYMBOL ¦please help how do i do this symbol without copy/pasting i babybloo Excel Worksheet Functions 1 June 26th 08 08:29 AM
Move the negaive symbol from the right to the left side of a numbe Oldersox Excel Worksheet Functions 2 March 19th 07 03:46 AM
I need a symbol but "symbol" in the Insert menu is grayed-out. Nothappy Excel Discussion (Misc queries) 2 May 3rd 05 12:16 AM


All times are GMT +1. The time now is 04:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"