Microsoft Office Forums Need help with if/then formulas
 Register FAQ Search Today's Posts Mark Forums Read

#1
04-19-2019, 02:37 AM
 elysse77 Windows 10 Office 2019 Banned Join Date: Apr 2019 Posts: 1
Need help with if/then formulas

Hello everyone,

I’m a novice at Excel and just recently found out how much easier it is to organize data and have Excel do all the “heavy lifting” for me at work.

What I pretty much want to do is have Excel generate a date after it references two different columns. For example, in one column I have dates, and in the second column I have text.

Column 1 has dates. Column 2 has text. So if I type in a specific text in the second column, I want it to generate the date 45 days from the first column in a third column. A different text would generate 45 days in the third column & 60 days in the fourth column.

Example 1: First column = 1 April 2019 Second column = ABC Third column = 16 May 2019 (automatically generates 45 days from Column 1 by Excel)

Example 2: First column = 1 April 2019 Second column = DEF Third Column = 16 May 2019 (automatically generates 45 days from Column 1 by Excel) Fourth column = 31 May 2019 (also automatically generates 60 days from Column 1 by Excel)

Thank you!
#2
04-19-2019, 06:59 AM
 p45cal Windows 10 Office 2016 Expert Join Date: Apr 2014 Posts: 280

In cell C2:
Code:
`=IF(OR(B2="ABC",B2="DEF"),A2+45,"")`
In cell D2:
Code:
`=IF(B2="DEF",A2+60,"")`
copy C2:D2 down.
You may need to format the cells with the formulae in as dates.

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post Grizz1955 Project 0 08-22-2017 05:26 AM ferrarifx Excel 2 11-16-2016 12:04 PM tsaladyga Excel 4 07-23-2014 09:04 AM paul_pearson Excel 0 03-20-2013 06:51 AM mizzamzz Excel 1 07-08-2010 02:32 AM

All times are GMT -7. The time now is 05:03 AM.

 -- Default Style -- Lightweight -- New Mobile Contact Us - Privacy Statement - Top