Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
andrewm
 
Posts: n/a
Default if statement module use please help


Could someone help - I have more than 7 functions to nest and come to
the conclusion to use module with vba. Sorry I cannot get it to work.
for example
=If(A1=1,"monday"),IF(A2=2,"Tuesday")).
I have tried modules and are frustated. where can I get step by step
help. or can someone attach an example spreadsheet. It would be
appreciated.

andrewm


--
andrewm
------------------------------------------------------------------------
andrewm's Profile: http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=374880

  #2   Report Post  
Max
 
Posts: n/a
Default

If col A contains the #s 1 to 7, one way to try:

Put in B1, and copy down:
=IF(A1="","",CHOOSE(A1,"Monday","Tuesday","Wednesd ay","Thursday","Friday","S
aturday","Sunday"))

Col B will return what you want
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"andrewm" wrote in
message ...

Could someone help - I have more than 7 functions to nest and come to
the conclusion to use module with vba. Sorry I cannot get it to work.
for example
=If(A1=1,"monday"),IF(A2=2,"Tuesday")).
I have tried modules and are frustated. where can I get step by step
help. or can someone attach an example spreadsheet. It would be
appreciated.

andrewm


--
andrewm
------------------------------------------------------------------------
andrewm's Profile:

http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=374880



  #3   Report Post  
Dana DeLouis
 
Posts: n/a
Default

Hi. If it's just the 7 items in your example, perhaps:
=TEXT(DATE(2001,1,A1),"dddd")

(no error checking though)
Perhaps the function "VLOOKUP" might work better for your real data.
HTH. :)
--
Dana DeLouis
Win XP & Office 2003


"andrewm" wrote in
message ...

Could someone help - I have more than 7 functions to nest and come to
the conclusion to use module with vba. Sorry I cannot get it to work.
for example
=If(A1=1,"monday"),IF(A2=2,"Tuesday")).
I have tried modules and are frustated. where can I get step by step
help. or can someone attach an example spreadsheet. It would be
appreciated.

andrewm


--
andrewm
------------------------------------------------------------------------
andrewm's Profile:
http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=374880



  #4   Report Post  
Max
 
Posts: n/a
Default

Think Dana's suggestion of VLOOKUP is much better, albeit according to Excel
help, the index_num in CHOOSE allows one to select one of up to 29 values
<g
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #5   Report Post  
Max
 
Posts: n/a
Default

"Dana DeLouis" wrote
=TEXT(DATE(2001,1,A1),"dddd")

Much neater ! (For the "direct" suggestion to the example in the post)

Perhaps the function "VLOOKUP" might work better for your real data.

And this is much more apt an answer to the post !
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


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
error "module not found" Amit Excel Discussion (Misc queries) 1 May 13th 05 01:24 PM
IF Statement Brent New Users to Excel 3 April 29th 05 04:24 PM
Difference in the listing of the New module addition in 2002 version Hari Excel Discussion (Misc queries) 2 January 4th 05 06:56 AM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM


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

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"