Pasting Excel Formula Results as Text Into Access

pliskers

Active Member
Joined
Sep 26, 2002
Messages
461
Office Version
  1. 2016
Platform
  1. Windows
I am attempting to paste the output of an Excel formula into an Access table (the field is text format). Even though I have used a TRIM function in the Excel formula, when the output is pasted into Access, a blank space is inserted before and after the formula result.

Is there a way to avoid this problem?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
In Excel why no try Paste Special...Values then select the range you have pasted and Copy then go to Access and Paste
 
Upvote 0
Sorry, but I don't understand your reply. Access does not offer the option to paste values. I am copying from Excel and pasting into Access. Can you describe again the sequence of steps you are recommending?
 
Upvote 0
First in Excel, select the range you want and Copy it, then Paste Special...Values to another location in the Excel workbook or even a new Excel workbook.

Now select the range you have pasted and Copy it.

Now go to Access and Paste.

Alternatively why not use the Trim function in an Update query in Access.
 
Upvote 0
Thanks, I actually found the solution myself - I needed to format the text cells (actually, a formula that returns text) in JUSTIFIED format, not LEFT (which includes an indentation).

Problem solved!
 
Upvote 0

Forum statistics

Threads
1,221,773
Messages
6,161,855
Members
451,724
Latest member
sledparty

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top