473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How can i split a cell in ms access query using any one of it's letter

For Example i have a text 2x2.5 in a cell and ineed in 2 in a cell and 2.5 is in another cell.i need to seperate by the value "x"
Jun 15 '11 #1
2 2482
code green
1,726 Expert 1GB
A combination of Instr with Left Mid or Right should work.
Use Instr to find the position of 'x' and use this as the index to parse the string
Jun 15 '11 #2
Adam Tippelt
137 100+
Expand|Select|Wrap|Line Numbers
  1. Public Function SplitCell(CurrentCell As String) As String
  2. Dim intLen As Long
  3. Dim intStart As Long
  4. Dim intEnd As Long
  5.  
  6. intLen = Len(CurrentCell)  'character length of the cell
  7.     intStart = intLen
  8.     While Mid$(CurrentCell, intStart, 1) <> "x" 'Loop locates the x in path
  9.         intStart = intStart - 1
  10.         intEnd = intEnd + 1
  11.     Wend
    YourNewFirstCell = intStart
    YourNewSecondCell = intEnd
That might work, but you'll have to get your subroutine to reference this function.
Jun 15 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steven C | last post by:
Hi, I'm sure there is a really simple way to do this... I'm trying to pass an input paramater to an Access query using OleDb. I know it can be achieved using a command object but this only seems...
1
by: jacksonec | last post by:
I am trying to use date fields in calculations so I know when a date is within 3 months of an expirationDate.
0
by: nostradumbass77 | last post by:
Using Enterprise Library 2.0 (Jan 06) and .NET 2.0 (VB.Net 2005) Dim dbPF As Data.Common.DbProviderFactory Try dbPF = Data.Common.DbProviderFactories.GetFactory("System.Data.OleDb") db = New...
3
by: austin1539 | last post by:
I am trying to run an Access query from Excel. The query, called "ProdActs1" works in Access and is run from using information from a table called "Queries". When a button is clicked in Excel, data...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
1
by: EwanD | last post by:
I am trying to read through and process an Access Query using VBA. I have used the OpenRecordset method with parameters as below OpenRecordset(sSourceRecordset, dbOpenDynaset) Where...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
9
by: EVH316 | last post by:
When I call this function Access gives me error msg "Too few parameters. Expected 3. " on the Set rstDAO = qryDef.OpenRecordset. Then I changed to Set rstDAO = qryDef.OpenRecordset(dbOpenSnapshot,...
5
by: yappy77 | last post by:
I have a query with an IIF statement that returns #ERROR. The results I want are if the requalify date is between 1/1/"year does not matter" and 3/31/"year does not matter" then First Quarter. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.