Solved

Why won't my Excel formular work in Access?

Posted on 2014-09-23
6
244 Views
Last Modified: 2014-09-29
Confirm Colum equals value and if yes
insert contents from another column eg CS-CV-A-0040 less the A

=IF([Check]="Confined Space",CONCATENATE(LEFT([Confined Space Audit Number,6]),RIGHT([Confined Space Audit Number,4])),"")
This is the data base formular which I cant get to run
=IF(G2="Yes",CONCATENATE(LEFT(B2,6),RIGHT(B2,4)),"")
This is the formular which works in excel
What have I done wrong
0
Comment
Question by:James Clements
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Expert Comment

by:Don Thomson
ID: 40340707
I would try it with the proper syntax  

IIf («expr», «truepart», «falsepart»)

Which version of Access are your using?

Not the two "I" s


IIF(G2="Yes",LEFT(B2,6)&RIGHT(B2,4)),"")

Also Concatenate is not valid in Access (at least up to Vers 2007
0
 
LVL 84
ID: 40341203
How are you running this in Access? Are you automating Excel from Access and using this, or are you trying to do this directly in Access?
0
 
LVL 37

Expert Comment

by:PatHartman
ID: 40341602
If you don't use embedded spaces and special characters which force you to encase the name in square brackets, you will have fewer opportunities for typos.

=IF([Check]="Confined Space",CONCATENATE(LEFT([Confined Space Audit Number],6),RIGHT([Confined Space Audit Number],4)),"")

You had the ending square brackets in the wrong place.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:James Clements
ID: 40343219
Still unable to run formular in MS Access 2010
1 [Check] column is "Confine Space" if not leave blank
2 IF true
3 Generate number form column [Confine Space Audit Number} eg CS-CV-A-0040
4 Remove the A from [Confine Space Audit Number} eg CS-CV-0040

This what I am trying to achieve should CONCATENATE work
0
 
LVL 37

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40344240
Still unable to run formular in MS Access 2010
What does that mean?  Are you getting an error message?  What is it?  Are you getting the wrong result?  What are the ALL the inputs and what are you ending up with?  Paste the exact code that is failing.
0
 

Author Closing Comment

by:James Clements
ID: 40351108
I had a spelling mistake in 1 of my columns thanks
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
default value of combobox 25 67
Linking Child/Parent fields between 2 subforms 15 57
Getting the 7Z zip dll to work with MS Access 8 51
SUBFORM on ACCESS 2013 8 27
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question