If function?

southernsquid

Board Regular
Joined
May 19, 2011
Messages
60
Looking to have D1 look at C1 for a certain text such as 19-040S and fill in a date 8-May-19 in D1. I will have other options in C1 via drop down with different dates to fill in if selected. Just need the formula for 1 to start. Thx!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try
=IF(C1="19-040S",DATEVALUE("08/05/2019"),"")
 
Upvote 0
Hi,

Since C1 is selected from Drop Down (DV), I suggest putting your desired results in an adjacent column next to your "Source" for the DV Dropdown as shown below, then use something like a VLOOKUP:


Book1
CDEFG
1Other8/11/201619-040S5/8/2019
2This6/9/2018
3That7/10/2017
4Other8/11/2016
5
6^^^Source for
7C1 DV Dropdown
Sheet387
Cell Formulas
RangeFormula
D1=VLOOKUP(C1,F1:G4,2,0)
 
Last edited:
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
You're welcome & thanks for the feedback


Hey quick question, if I want t continue toad variables do I put the next series in quotes like the first or do I use a comma? Example below.

=IF(C2="19-040S",DATEVALUE("05/08/2019"),"")(=IF(C2="19-050S",DATEVALUE("05/15/2019"),"")=IF(C2="19-060S",DATEVALUE("05/22/2019"),"")
 
Upvote 0
It needs to be like
=IF(C2="19-040S",DATEVALUE("05/08/2019"),IF(C2="19-050S",DATEVALUE("05/15/2019"),IF(C2="19-060S",DATEVALUE("05/22/2019"),"")))

but if you have a lot of these I'd recommend creating a lookup table & then using Vlookup, jtakw showed.
 
Upvote 0
It needs to be like
=IF(C2="19-040S",DATEVALUE("05/08/2019"),IF(C2="19-050S",DATEVALUE("05/15/2019"),IF(C2="19-060S",DATEVALUE("05/22/2019"),"")))

but if you have a lot of these I'd recommend creating a lookup table & then using Vlookup, jtakw showed.

Ok, yes it was easier to follow @jtakw's recommendations. I have found that it was hard to coy the Vlookup to additional cells without identifying the source cells, but I will just adjust each one Thanks Guys!!
 
Upvote 0
If you use this version of jtakw' formula
=VLOOKUP(C1,F$1:G$4,2,0)
then you can simply copy the formula down
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top