Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dawn-Anne
 
Posts: n/a
Default 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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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" wrote in message
...
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   Report Post  
Dawn-Anne
 
Posts: n/a
Default

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 03:29 PM
Trim function doesn't clean out ASCII Code 160 (Space) Ronald Dodge Excel Worksheet Functions 6 January 27th 05 04:48 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 01:25 AM
How do I nest an OR function within an AND function? DebbieK Excel Worksheet Functions 3 November 30th 04 07:03 PM


All times are GMT +1. The time now is 03:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"