Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would like to write a formula that looks at one cell and sees if there is a
certain letter, R, L or C. and depending on what letter is there it would add so many days to another date. I am sure I did it before but I do not remember how I did it. Can anyone help? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=if(a1="R",5,if(a1="L",7,if(a1="C",10,"input error")))
If you've got more than three or four such conditions, you'll be better served by using a vlookup. "MikeL" wrote: I would like to write a formula that looks at one cell and sees if there is a certain letter, R, L or C. and depending on what letter is there it would add so many days to another date. I am sure I did it before but I do not remember how I did it. Can anyone help? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Use a nested IF statement. Say the original date is in cell A1 and the
letter R, L, or C is in B1 and you want to add 1 for R, 2 for L and 3 for C, in cell C1 (which should be formatted as a Date) enter the formula =IF(B1="R",A1+1,IF(B1="L",A1+2,IF(B1="C",A1+3))) Modify the formula to reflect the correct cells and the desired additional days. "MikeL" wrote: I would like to write a formula that looks at one cell and sees if there is a certain letter, R, L or C. and depending on what letter is there it would add so many days to another date. I am sure I did it before but I do not remember how I did it. Can anyone help? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Mike
Supposing your date in B1 and the value you are testing is in A1. Assuming want to add say 5 days for R, 3 days for L or 7 days for C =B1+5*(A1="R")+3*(A1="L")+7*(A1="C") -- Regards Roger Govier "MikeL" wrote in message ... I would like to write a formula that looks at one cell and sees if there is a certain letter, R, L or C. and depending on what letter is there it would add so many days to another date. I am sure I did it before but I do not remember how I did it. Can anyone help? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
one way
in another cell say b1 =if(a1="R",1,if(a1="L",2,3)) in another cell have =another date+B1 -- paul remove nospam for email addy! "MikeL" wrote: I would like to write a formula that looks at one cell and sees if there is a certain letter, R, L or C. and depending on what letter is there it would add so many days to another date. I am sure I did it before but I do not remember how I did it. Can anyone help? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Try this formula =B1+LOOKUP(A1,{"C","L","R";1,2,3}) -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=501254 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
Formula to delete blank cells across multiple columns? | Excel Worksheet Functions | |||
How do I copy a reference formula onto multiple worksheets | Excel Worksheet Functions | |||
How to: Multiple "if" statements? | New Users to Excel | |||
apply a formula to multiple cells | Excel Discussion (Misc queries) |