Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default if/countif for 12 different arguments

I'm trying to write an if/countif function for the following situation:

if column L has the 2nd and 3rd #s that are "01" then write "01" in column M
if column L has the 2nd and 3rd #s that are "02" then write "02" in column
M, etc.
all the way to 12. (01, 02,....12 standing for the days of the month.)

I wrote:
if(countif(L3,"?01*"),"01",if(countif(L3,"?02*")," 02",if(countif(L3,"?03*"),"03", etc.
but it's wrong b/c I don't know how to write a long if function.

Can someone help?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default if/countif for 12 different arguments

So, you basically just want to return the 2nd and 3rd characters from the
string in column L? Try this:

=MID(L3,2,2)

HTH,
Elkar


"Studebaker" wrote:

I'm trying to write an if/countif function for the following situation:

if column L has the 2nd and 3rd #s that are "01" then write "01" in column M
if column L has the 2nd and 3rd #s that are "02" then write "02" in column
M, etc.
all the way to 12. (01, 02,....12 standing for the days of the month.)

I wrote:
if(countif(L3,"?01*"),"01",if(countif(L3,"?02*")," 02",if(countif(L3,"?03*"),"03", etc.
but it's wrong b/c I don't know how to write a long if function.

Can someone help?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default if/countif for 12 different arguments

Are these dates you're working with?

What's in L3? You'll need to show us some examples.

--
Biff
Microsoft Excel MVP


"Studebaker" wrote in message
...
I'm trying to write an if/countif function for the following situation:

if column L has the 2nd and 3rd #s that are "01" then write "01" in column
M
if column L has the 2nd and 3rd #s that are "02" then write "02" in
column
M, etc.
all the way to 12. (01, 02,....12 standing for the days of the month.)

I wrote:
if(countif(L3,"?01*"),"01",if(countif(L3,"?02*")," 02",if(countif(L3,"?03*"),"03",
etc.
but it's wrong b/c I don't know how to write a long if function.

Can someone help?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default if/countif for 12 different arguments

That is so Cool!
And it works with letter's as well!
What are some of the boundaries of this equation?
--
Thanks and God bless you and yours,
Gabriella777_2



"Elkar" wrote:

So, you basically just want to return the 2nd and 3rd characters from the
string in column L? Try this:

=MID(L3,2,2)

HTH,
Elkar


"Studebaker" wrote:

I'm trying to write an if/countif function for the following situation:

if column L has the 2nd and 3rd #s that are "01" then write "01" in column M
if column L has the 2nd and 3rd #s that are "02" then write "02" in column
M, etc.
all the way to 12. (01, 02,....12 standing for the days of the month.)

I wrote:
if(countif(L3,"?01*"),"01",if(countif(L3,"?02*")," 02",if(countif(L3,"?03*"),"03", etc.
but it's wrong b/c I don't know how to write a long if function.

Can someone help?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default if/countif for 12 different arguments

That's exactly what I needed. Thank you so much!

"Elkar" wrote:

So, you basically just want to return the 2nd and 3rd characters from the
string in column L? Try this:

=MID(L3,2,2)

HTH,
Elkar


"Studebaker" wrote:

I'm trying to write an if/countif function for the following situation:

if column L has the 2nd and 3rd #s that are "01" then write "01" in column M
if column L has the 2nd and 3rd #s that are "02" then write "02" in column
M, etc.
all the way to 12. (01, 02,....12 standing for the days of the month.)

I wrote:
if(countif(L3,"?01*"),"01",if(countif(L3,"?02*")," 02",if(countif(L3,"?03*"),"03", etc.
but it's wrong b/c I don't know how to write a long if function.

Can someone help?

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
arguments gemini0662 Excel Discussion (Misc queries) 9 July 13th 06 03:48 PM
COUNTIF arguments Rich Excel Discussion (Misc queries) 3 December 9th 05 04:13 PM
How do I set up an array using countif for 2 separate arguments. crich Excel Worksheet Functions 5 August 16th 05 09:22 AM
=COUNTIF How to if 2 or more arguments??? Trixie Excel Worksheet Functions 1 March 3rd 05 07:55 PM
Are there too many arguments Pat Excel Worksheet Functions 4 January 13th 05 03:54 AM


All times are GMT +1. The time now is 05:50 AM.

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

About Us

"It's about Microsoft Excel"