LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default If JobNumber = Val(field(7)) Then Query

To all,

I have the following code:

If JobNumber = Val(field(7)) Then


It looks at field (7) which is typically a 5 digit number i.e. 36238

If JobNumber = 36238 then it will continue the script.

however in some cases the value in field (7) is 36238 OP1 or 36238/2
etc. How can I get it to search just the first 5 digits i.e 36238 of
the field (7) value, and enable the script to continue, rather than
returning nothing as it does at the moment?

Thanks in advance for your help,

regards

Joseph Crabtree
 
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
Split Field content in Query? Abdul[_2_] Excel Programming 2 April 30th 06 02:04 PM
can't change field name in query? rachael Links and Linking in Excel 4 February 7th 06 07:48 PM
How do I create a query field in Excel Sean Excel Discussion (Misc queries) 1 July 20th 05 08:47 PM
query field pipe Excel Programming 0 October 26th 04 08:19 PM
DAO query/recordset returns with field names Seth[_4_] Excel Programming 0 August 18th 03 08:36 PM


All times are GMT +1. The time now is 08:26 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"