PC Review


Reply
Thread Tools Rate Thread

What Access function would = the folllowing from Excel: =MID(H31,1,FIND(",",H31)+5)

 
 
Ben
Guest
Posts: n/a
 
      29th Mar 2007
Access does not seem to have FIND function. I need to capture Last
Name + Comma + First 4 Characters of First name. In the Mid function
since last names are variable length, I need to determine the location
of the comma within the field, then capture from 1 to Comma plus 5
characters.

This works in Excel, and I updated Access to read as follows:

=MID([Name],1,FIND(",",[Name])+5)

Access does not like FIND though

 
Reply With Quote
 
 
 
 
George Nicholson
Guest
Posts: n/a
 
      29th Mar 2007
=Mid([Name],1,Instr(1,[Name],",")+5)

"Ben" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Access does not seem to have FIND function. I need to capture Last
> Name + Comma + First 4 Characters of First name. In the Mid function
> since last names are variable length, I need to determine the location
> of the comma within the field, then capture from 1 to Comma plus 5
> characters.
>
> This works in Excel, and I updated Access to read as follows:
>
> =MID([Name],1,FIND(",",[Name])+5)
>
> Access does not like FIND though
>



 
Reply With Quote
 
=?Utf-8?B?SmVycnkgV2hpdHRsZQ==?=
Guest
Posts: n/a
 
      29th Mar 2007
In Access it's Instr().

Debug.Print Left("Whittle, Jerry",Instr("Whittle, Jerry",",")+ 5)
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

"Ben" wrote:

> Access does not seem to have FIND function. I need to capture Last
> Name + Comma + First 4 Characters of First name. In the Mid function
> since last names are variable length, I need to determine the location
> of the comma within the field, then capture from 1 to Comma plus 5
> characters.
>
> This works in Excel, and I updated Access to read as follows:
>
> =MID([Name],1,FIND(",",[Name])+5)
>
> Access does not like FIND though
>
>

 
Reply With Quote
 
Bill Edwards
Guest
Posts: n/a
 
      29th Mar 2007
=left([Name], instr(1,[Name],",") + 5)

By the way it is bad practise to name a field or variable NAME
It is also bad practise to have a field that contains both lastname and
firstname

"Ben" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Access does not seem to have FIND function. I need to capture Last
> Name + Comma + First 4 Characters of First name. In the Mid function
> since last names are variable length, I need to determine the location
> of the comma within the field, then capture from 1 to Comma plus 5
> characters.
>
> This works in Excel, and I updated Access to read as follows:
>
> =MID([Name],1,FIND(",",[Name])+5)
>
> Access does not like FIND though
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 change colour when "find" function is used sanmos Microsoft Excel Misc 1 22nd Oct 2009 05:04 AM
What is MS-ACCESS equivalent of MS-Excel function "FIND"? Shaukat Microsoft Access Queries 2 29th Feb 2008 02:22 PM
what is the function in ms access like ""sumif""in ms excel? =?Utf-8?B?aXNsYW0gbGFiaWI=?= Microsoft Access Reports 1 14th Nov 2007 06:09 AM
Using "Find" function in Excel 2000, edit data without closing Fin =?Utf-8?B?cmtncGlodw==?= Microsoft Excel Misc 1 21st Aug 2006 07:39 PM
Lotus Approach to Access - "find" function =?Utf-8?B?Um95?= Microsoft Access Getting Started 4 8th Dec 2004 06:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:35 PM.