Can you nest a MID function within a IF function in Excel

D

Dawn-Anne

My formula for a worksheet is ="2/99/-4/-" &
IF(MID($C$8,7,1)=1,8,MID($C$8,4,1)) & "/980120", where C8 value is
2/02/-1/825100.

Cell returns 2 and not 8 as I had hoped. Any ideas?
 
B

Bob Phillips

Hi Dawn-Anne,

You need to test for a string when using MID

="2/99/-4/-"&IF(MID($C$8,7,1)="1",8,MID($C$8,4,1))&"/980120"

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top