LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
CTA CTA is offline
external usenet poster
 
Posts: 2
Default If Then formula for excel

"Tom Ogilvy" wrote in message ...
This basically uses Nate's approach, but used Choose rather than vlookup and
adds a few more checks.

=IF(OR(WEEKDAY(A3)=1,WEEKDAY(A3)=7,SUM(COUNTIF(A1, {"A","B","C"}))=0),"",A3+(
A1="A")*CHOOSE(WEEKDAY(A3)-1,4,6,5,4,4)+(A1="B")*CHOOSE(WEEKDAY(A3)-1,7,6,5,
5,5)+(A1="C")*CHOOSE(WEEKDAY(A3)-1,7,6,6,6,6))

--
Regards,
Tom Ogilvy



"Nate Oliver" wrote in message
...
Hello,

Assuming A1 houses A,B,C or otherwise, try the following:


=IF(WEEKDAY(A3)=1,"",IF(A1="A",VLOOKUP(WEEKDAY(A3) ,{2,4;3,6;4,5;5,4;6,4},2,0
)+A3,IF(A1="B",VLOOKUP(WEEKDAY(A3),{2,7;3,6;4,5;5, 5;6,5},2,0)+A3,IF(A1="C",V
LOOKUP(WEEKDAY(A3),{2,7;3,6;4,6;5,6;6,6},2,0)+A3," "))))

Best Regards,
Nate Oliver


Thanks Nate, this worked.

Any suggestions on protecting the cells so the formula can't be modified/deleted?
 
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
Excel formula to copy/paste formula needed please. colwyn Excel Discussion (Misc queries) 4 October 22nd 08 11:27 PM
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM
How do I view formula results intead of formula in excel? davidinatlanta Excel Worksheet Functions 4 February 7th 06 03:02 PM


All times are GMT +1. The time now is 02:14 AM.

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"