Solved

Why won't my Excel formular work in Access?

Posted on 2014-09-23
6
252 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 85
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 38

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
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.

 

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 38

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

636 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