Link to home
Start Free TrialLog in
Avatar of sandramac
sandramac

asked on

Formula Help

Hello All

I have a formula that parses out data here is the code, listed below.  It works fine, until today.  I get an error value when this set of data appears, listed under the formula.  I am trying to parse out the time, which is normally looks for the first Z, however in the data, the first Z is in the station identifier, i need to look for the second Z and then parse out the number.  How do i modified this code to handle these instances.  Thanks

=IF(MID('Parsed Data'!A1,FIND("Z",'Parsed Data'!A1)-4,2)="23",0,MID('Parsed Data'!A1,FIND("Z",'Parsed Data'!A1)-4,2))+2

KBZN 291656Z 22022G32KT 10SM FEW090 SCT120 18/00 A2964 RMK AO2 PK WND 23032/1655 SLP014 T01780000 $
Avatar of [ fanpages ]
[ fanpages ]

Hi,

Here is one method:

=IF(MID('Parsed Data'!A1,FIND("Z",MID('Parsed Data'!A1,FIND(" ",'Parsed Data'!A1)+1,255))+FIND(" ",'Parsed Data'!A1)-4,2)="23",0,MID('Parsed Data'!A1,FIND("Z",MID('Parsed Data'!A1,FIND(" ",'Parsed Data'!A1)+1,255))+FIND(" ",'Parsed Data'!A1)-4,2))+2

I suspect other "Experts" may offer differing proposals.

I have attached a workbook demonstrating the existing formula, & my revision.

BFN,

fp.
Q-28252878.xls
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just for clarity, whenever I say other "Experts" may propose a different formula, I always mean barry will offer a shorter version! :)
Just for clarity, whenever I say other "Experts" may propose a different formula, I always mean barry will offer a shorter version! :)

+1 :)
You're welcome, sandramac.
Avatar of sandramac

ASKER

Sorry, thank you both for you help with my problem.