LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default How to convert cell formula functions to code functions

Hi,

Does anyone know how to convert the two following formula lines to code:

=TRIM(MID(B29,FIND("NCE:",B29,1)+5,FIND("TO",B29,1 )-FIND("NCE:",B29,1)-5))
=TRIM(RIGHT(A7,LEN(A7)-FIND("TO",A7,1)-1))

I tryied it myslef but can't get it to work, I'm getting a compiling error,
here's what I have so far:

Format(Trim(Mid(InStr(1, Cells(4, 2) + 5, "NCE:", 1), InStr(1, Cells(4, 2),
"TO") - InStr(1, Cells(4, 2) - 5))), "dd-mmm-yy")
Format(Trim(Right(Cells(4, 2), Len(Cells(4, 2)) - InStr(1, "TO", Cells(4,
2), 1) - 1)), "dd-yyy-mm")

Thanks for any help provided,
Adnan
 
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
formula/functions for average and if functions Petu71 Excel Worksheet Functions 2 August 5th 07 08:25 PM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
How do I convert functions that are zero into a null ? Nick Excel Worksheet Functions 4 May 12th 05 12:44 AM
How do I use Excel Built-In Functions in Code? Steve Haack Excel Worksheet Functions 7 April 26th 05 09:55 PM
Where can I see VBA code for financial functions? eios Excel Worksheet Functions 1 November 2nd 04 01:00 PM


All times are GMT +1. The time now is 07:27 AM.

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"