LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
brookdale
 
Posts: n/a
Default Complex if and mid function.


I have been saving the worst question for last. So here it is…Take his
line for example:

" TBA TBA LECT TTH 01:30PM 02:50PM"

The quotes show were it starts and ends. (There is some spacing in the
beginning.) This is largely what most of my recent questions have been
regarding. I need to create a function that will produce as a solution
whatever you see after the LECT. It would range from 1 to 3 characters.
(It is basically a day of the week: M,T,W,TH or THH, and F.)

Now here is the major problem! In this example the TTH starts in the
22nd space. There are hundreds of these, but they do not necessarily
start in the 22nd slot. Coming from the right it will always start in
the 22nd, 23rd, or 24th slot.

How can I write an equation to pull out that date section. I am so
lost


PS: I have been working on this today. Here is what I have been trying
to do, but it is giving me one or two errors:

=MID(IF(ISBLANK(C2),K2,C2),FIND((IF(ISBLANK(C2),K2 ,C2)),(" * "),20),4)

In the red part I attempted to say look in the section with the text. I
think that part is okay. In the middle part (here is where the trouble
is), I attempted to get the starting point of the day text, so that it
could go into the mid function. No matter what the combination, the day
(as it occurs after LECT) will always be at least 20 spaces in. If I
could get this value, then I would be able to get the part in green
(the space plus the next 3 characters, incase of THH).

Well...goodluck. I know I can't figure this out.


--
brookdale
------------------------------------------------------------------------
brookdale's Profile: http://www.excelforum.com/member.php...o&userid=24617
View this thread: http://www.excelforum.com/showthread...hreadid=382788

 
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



All times are GMT +1. The time now is 04:45 PM.

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

About Us

"It's about Microsoft Excel"