+ Reply to Thread
Results 1 to 3 of 3

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

Hybrid View

  1. #1
    Dawn-Anne
    Guest

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

    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?


  2. #2
    Bob Phillips
    Guest

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

    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)


    "Dawn-Anne" <[email protected]> wrote in message
    news:[email protected]...
    > 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?
    >




  3. #3
    Dawn-Anne
    Guest

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

    Thanks Bob - worked a treat. Better start glueing my hair back in!

    "Dawn-Anne" wrote:

    > 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?
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1