Find Jobs
Hire Freelancers

Excel Macro Editing

$30-100 USD

Completed
Posted over 12 years ago

$30-100 USD

Paid on delivery
I have a macro code here that takes a range of text files from any given folder and imports them into different cells of an Excel Spreadsheet. However I need some editing done on this macro code so that it does what I need it to do. This is the macro that I currently use without any major problems. Sub ImportText() Dim fileRow As Integer Dim pathname As String Dim j As Integer, i As Integer, filenameLen As Integer [login to view URL] = False [login to view URL] = False filetoOpen = [login to view URL] _ ("Select Letter Files (*.txt),*.txt", , , , True) If IsEmpty(Range("A1")) Then fileRow = 1 Else fileRow = [login to view URL]( _ [login to view URL]).Row + 1 End If For i = 1 To UBound(filetoOpen, 1) [login to view URL] Filename:=filetoOpen(i), _ Origin:=xlWindows, StartRow:=1, _ DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _ ConsecutiveDelimiter:=False, Tab:=False, _ Semicolon:=False, Comma:=False, _ Space:=False, Other:=False [login to view URL] [login to view URL] Set newBook = ActiveWorkbook 'reference to textfile [login to view URL] With Workbooks("[login to view URL]").Worksheets("Sheet1") [login to view URL] Destination:=.Cells(fileRow, 1) fileRow = .[login to view URL]( _ .[login to view URL]).Row + 1 End With [login to view URL] fileRow [login to view URL] Next i [login to view URL] = True [login to view URL] = True End Sub What I need this to do: 1) I need the macro to be able to be inserted on ANY spreadsheet. Currently it only works if I SAVE the spreadsheet as [login to view URL] (which you can see in the code above). It should be able to work on any open spreadsheet. 2) I need it to be able to paste the data according whichever cell I select as a starting point. Currently it only imports to Cell A1 and onwards. 3) I should be able to run this multiple number of times on any given sheet. Meaning if I wish to have data pasted on A3 and then subsequently R5, I should be able to do that. I am learning Excel, so kindly go easy on your bids since I won't be able to afford a lot. Thanks :)
Project ID: 2699745

About the project

13 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$10 USD in 14 days
5.0 (37 reviews)
0.0
0.0
13 freelancers are bidding on average $21 USD for this job
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (6 reviews)
0.0
0.0
User Avatar
See private message.
$51 USD in 14 days
5.0 (27 reviews)
0.0
0.0
User Avatar
See private message.
$12 USD in 14 days
5.0 (587 reviews)
0.0
0.0
User Avatar
See private message.
$20 USD in 14 days
4.9 (59 reviews)
0.0
0.0
User Avatar
See private message.
$13 USD in 14 days
4.9 (97 reviews)
0.0
0.0
User Avatar
See private message.
$40.80 USD in 14 days
4.9 (102 reviews)
0.0
0.0
User Avatar
See private message.
$25.50 USD in 14 days
4.5 (56 reviews)
0.0
0.0
User Avatar
See private message.
$10 USD in 14 days
5.0 (62 reviews)
0.0
0.0
User Avatar
See private message.
$10 USD in 14 days
4.9 (17 reviews)
0.0
0.0
User Avatar
See private message.
$10 USD in 14 days
5.0 (145 reviews)
0.0
0.0
User Avatar
See private message.
$30.60 USD in 14 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$13 USD in 14 days
4.9 (10 reviews)
0.0
0.0

About the client

Flag of INDIA
Kolkata, India
5.0
10
Member since Apr 27, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.