Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use a lookup table instead:
Find an unused area and enter a table like this: A Sun 4 6 5 4 4 Sat B Sun 7 6 5 5 5 Sat C Sun 7 6 6 6 6 Sat Select the whole table and Insert-Name-Define and enter a name e.g. adddays. Assuming that A1 is the cell where the category is entered, then in B3 enter the formula =VLOOKUP($A$1,adddays,Weekday(A3)+1) Or if you don't care what happens to weekends, do it like this: A 4 6 5 4 4 B 7 6 5 5 5 C 7 6 6 6 6 Select the whole table and Insert-Name-Define and enter a name e.g. adddays. Assuming that A1 is the cell where the category is entered, then in B3 enter the formula =VLOOKUP($A$1,adddays,Weekday(A3)) CTA wrote: I am trying to write a if then formula based on the category entered into a cell. There are three categories. Category A, B, & C. If category A is entered I want the following formula to be executed =IF((WEEKDAY(A3)=2),A3+4,IF((WEEKDAY(A3)=3),A3+6,I F((WEEKDAY(A3)=4),A3+5,IF((WEEKDAY(A3)=5),A3+4,IF( (WEEKDAY(A3)=6),A3+4,""))))) If category B is entered I want the following formula to be executed. =IF((WEEKDAY(A3)=2),A3+7,IF((WEEKDAY(A3)=3),A3+6,I F((WEEKDAY(A3)=4),A3+5,IF((WEEKDAY(A3)=5),A3+5,IF( (WEEKDAY(A3)=6),A3+5,""))))) If category C is entered I want the following formula to be executed. =IF((WEEKDAY(A3)=2),A3+7,IF((WEEKDAY(A3)=3),A3+6,I F((WEEKDAY(A3)=4),A3+6,IF((WEEKDAY(A3)=5),A3+6,IF( (WEEKDAY(A3)=6),A3+6,""))))) How can I accomplish this with excel? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel formula to copy/paste formula needed please. | Excel Discussion (Misc queries) | |||
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible | Excel Discussion (Misc queries) | |||
Build excel formula using field values as text in the formula | Excel Worksheet Functions | |||
Excel 2002 formula displayed not value formula option not checked | Excel Worksheet Functions | |||
How do I view formula results intead of formula in excel? | Excel Worksheet Functions |