Email:      Pass:    Pass?
Close Window   
Free Ebook
Get Your Free Excel
Our Top 15 Excel Tutorials
Instant Access!
Subscribe for Free Excel tips & more!


Free Excel Forum

How To Append Text To Cell Data ...

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More


I have a column in Excel (Mac) with data file names. None have a file extension....
eg PD102310

I need to append the text ".wav" to every cell (over 10,000 of them) without touching the exisiting name.

Can anyone tell me how to do this???

Thanks in advance


View Answers     

Similar Excel Video Tutorials

Helpful Excel Macros

Excel Macro to Save a Specific Worksheet as a New File
- This Excel Macro allows you to save a specific worksheet within the Excel Workbook to its own new file. You will be a
Save the Current Worksheet as a New Excel Workbook File
- This Excel Macro will save the currently visible/active worksheet (the one that you see when you run the macro) to a
Macro to add a New Line to Message Box Pop-up Windows in Excel
- This is a very simple Message Box, pop-up window, macro for Excel that illustrates how to put new lines, the same thi
Complete Guide to Printing in Excel Macros - PrintOut Method in Excel
- This free Excel macro illustrates all of the possible parameters and arguments that you can include in the PrintOut Meth
Output the Name of the Current Excel Workbook Without the File Extension - UDF
- Free Excel UDF that displays the name of the Excel workbook without its extension. This is a great UDF (user defined fu

Similar Topics

I have over 1,000 text files on my hard drive.
I need to add a different line of text (a cell value) to the bottom of each of these text files (without opening them)...

I have the following setup in mind...

Column A
all text file names, including path:

Column B
all the different values to append at the end of the "same row" text file:
this text (to append at the end of text1.txt)
some other text (to append at the end of text2.txt)
this text variation (to append at the end of text3.txt)

So my Excel 2003 sheet should look like this...

row1 - (A)C:\folder1\text1.txt - (B)this text
row2 - (A)C:\folder1\text2.txt - (B)some other text
row3 - (A)C:\folder1\text3.txt - (B)this text variation

Running the macro should do the following (row per row)
- append the cell value from column B to the text file in cell column A
- save the newly created text file in C:\folder2\ under the same file name.

I hope this makes sense.

Thanks for your help!!!

P.S. I use Excel 2003 and I have no VBA programming skills, so..., much obliged to anyone who can help me out here!

I'm going to be receiving data via FTP to a certain folder that I need to open and append to a holding file (another text file), which I will then import into Excel, parse, reformat and save to yet another text file for import into another application. I don't know how many files are going to be in the designated folder at any given time or what their names are going to be (only that there could be as few as one and they will have a .txt extension). I know how to find and read in a single file name into a variable, but I'm not sure how to do it with multiple files (I suspect I will have to read them into an array or something, but I am not sure how to do this). I also know how to open to text files - 1 as source and 1 as target and append lines from source to target. I have the routine already written to import the "holding" file, reformat and append to the import file and it works with just one text file at a time. I also plan to write a "clean-up" routine to remove the text files once they have been successfully posted. That way, the assumption can be made each time the routine is run that any new text files in the folder will not have already been posted. It's mostly the identifying and reading in the multiple filenames that I need to process that I need help with.

Thanks in advance for any help,



I would like to know the best way to collect and display the following data.

I am exporting data from NetSuite to an .xlsx file for each quarter and daily exporting the latest QTD.

I would like to build a file that uses the data from (for example) 2012-Q4, append 2013-Q1, append 2013-Q2 to date

So each day I build this report, I can keep appending the historical data to the most current "quarter to date" data.

I'm guessing this is best done in PowerPivot, because there will be many rows of data.

In the past, I have always imported data into excel from the .xlsx file, but it always overlays the entire file rather than append.

Thanks in advance!

I don't know how complicated or simple this is, but I urgently need a macro that does the following for 372 rows.

Copy one row, duplicate it (either into a new sheet or on the current sheet) so that there are now 4 instances of the row, then append different bits of text to the cell in the first column of each of these four rows (append "-43", "-6", "-8", and "-10" respectively).

I know I probably did a horrible job of describing that, so I have attached an XLSX book. The "Beginning" sheet is a very condensed example of what I have now. The "End" sheet is what it would look like after the macro has been executed.

Obviously, doing this manually to 372 rows would be very time consuming and I really need to have this done soon.

Thank you very very much to whoever can help!

Edit: I have also uploaded the example workbook as a XLS file.


What I need to be able to do is to append characters en masse to the contents of a column of cells.

I have a column of cells that contain a model # of digitally downloaded products. The model number incidentally also happens to be the file name of the product's file.

For instance, in my spreadsheet I have a column of model #s like this...


What I need to do is make a new column called FILE NAMES and copy that MODEL column over. That's easy enough. But then I need to be able to append characters (which is basically a file extension) to the contents of all the cells in that column so that the end result is what you see below...


Is this possible to do en masse within Excel?

I have searched all over the web yesterday for a solution to my problem and I have look all through Excel help, but I cannot find a solution.

I hope I can find the solution here in this forum. I have tried the search function and have not found any threads that pertain to this same problem. Hopefully there is a solution as I am at my rope's end and do not want to have to append the file extension manually as there are thousands of products


Hi everyone,

I am trying to write this code where I need to save an excel workbook with a number of tabs to 1 text file with a name of users choice.

I am able to do this if there is a separate file for every worksheet within the workbook but not if we have the same text file to append every time.

Can anyone help me with a function that append to the 1 text file.



I have a spreadsheet containing 700 lines. One of the columns contains a file path text string (/images/example.jpg) and I need to append a web address to this string ( so that each becomes (

I'm sure this must be possible, but to be honest I have had very little Excel experience. My background, whilst technical, is network infrastructure.

Thanks in advance for any suggestions.


Apologies, should have said that it is purely text - I'm not using hyperlink formatting in the spreadsheet as the intention is to save as a csv file.

I have an access table that I append each month with new data. The column names are the same in the table and the append table. I did not have an issue until I upgraded to access 07. When I append the Monthly table to the master table the append to file column headings have [] around the column name. The column name in brackets has the correct column heading. Example [pro number]. I have to use the drop down box to designate the correct column to append to. How can I correct?


Via a macro, is it possible to...

Append the text content of (example) B5 at the end of text already in (example) Text Box 94?

I'm giving thought to accumulating statements within a text box, as various conditions are met, using the text contents of individual cells as inputs.


If A1= 4 then append contents of B5 into existing Text Box 94
If A2 = 2 then append contents of B2 into existing Text Box 94

The end result being an accumulation of text, not a case-by-case over-writing.

The creative cut-and-pasting this might need is beyond my imagination.
Thanks for looking!

I want to use Chip Pearson text import code from:

I see that I can feed the text file names to the subroutine by using
the code: ImportTextFile "c:\temp\test.txt", ";".

This is an easy programming question, but how do I feed the sub several
text file names derived from cells in a column, that don't have the
file extension ".txt" appended? I see that VBA is somewhat like
functions, but can I just say: ImportTextFiles ("h:\textfiles\" & D47 &
" "), " " to have it import a text file from the h:\textfiles\
Directory with the name of whatever the name is in cell D47 to the
active cell?

Hello, is there an easy way to append data to the end of a cell in 2007?

For instance, I need to add a text string to a list of names in a worksheet, such as Happy Holidays. This text should be added to an existing list of names.


Hi all!

I was wondering is there a way that I can append several sheets in excel (each file containing the date in the format of yyyy-mm-dd) into a new file? I would like to automate this process where the user is capable of entering the start and end date.
For example, I would like to append the three files: t-20100922, t-20100921, t-20100920. Is there a way for me to do this?
Also, each excel file has several tabs, one of the tabs will contain the sheet that I would like to append.

please helP!



Hi all!

I was wondering is there a way that I can append several sheets in excel (each file containing the date in the format of yyyy-mm-dd) into a new file? I would like to automate this process where the user is capable of entering the start and end date.
For example, I would like to append the three files: t-20100922, t-20100921, t-20100920. Is there a way for me to do this?
Also, each excel file has several tabs, one of the tabs will contain the sheet that I would like to append.

please helP!



I would like to append some data in columns A to F into a text file and can't seem to do this because it says that there is a type mismatch. My code is below (extracted from another post on this site). Can someone help?

Sub Create_A_Text_File()
Dim myPath As String, myFile As String
Dim mydata

myPath = "c:\testing\"
myFile = "file.txt"

'Open myPath & myFile For Output As #1 ' Open file for output - clears current data
Open myPath & myFile For Append As #1 ' Open file for output - updates current data
mydata = Sheet2.Range("A2:F4")
Print #1, mydata ' Print text to file. You can change this to suit.

Close #1 ' Close file.

End Sub

Help is always appreciated

So I need to do two things.

Pull data from INDEX(3:3,MATCH("Address",$1:$1,0)) on another worksheet


prepend and append to the result.

I know how to prepend and append, the problem is part of what I need to prepend/append is a quotation mark, which is part of the prepend/append formula and thus invalidates it.

How do I force Excel to let me prepend a quotation marks in the actual text?

Also, how do I do an indexmatch reference on another sheet? I need it to find whatever column says address, regardless of which column its in. When I tried doing:


it gave me an error.

Hey. New user here.

I need to create a rule that will append data to the end of a url to pull images for a ecommerce store.

I have a column that needs filled in with a image url.

For example:
Each image url starts with

Then, it needs the style number, which is in column A, and then a _ and color, which is column B, and then .JPG added to the very end.

The final example url will look like this:

Each row has it own color, so each row will need a unique url to the image location. The data for each url is all in the same row.

So, how can i add a formula to each row so that it will pull the data and add the file extension for each row?

Thanks in advance.


P.S. I can send over an example xls file if needed.


I have an Excel file that has about 8 work sheets. I have created a data base in Access (2007) where I wanted to append records from the Excel file for each of the work sheet. In Access, I think it allows only overwriting the exisitng data and not append. Is there a way to append all the 8 worksheets from Excel into Access in one go ?


Within my macro I have been using variations on the code below (thanks to this board) to write the contents of a range to a text file.

Is there a simple change to this code so that it will append rather than create new?

I would like it to Start a new line at the end of the txt file and when finished with the range add one more line of Text "End of Export for this incident"

Thanks for the help,

Sub ExportRangeToTextFile()

Dim FName As Variant
Dim myRange As Range
Dim fs, f

Set myRange = Sheets("Sheet1").Range("A2:F6")

ChDir "C:\Text"

FName = "TestText.txt"

'open the file for writing

Set fs = CreateObject("Scripting.FileSystemObject")

Set f = fs.CreateTextFile(FName, True)

'write the data from the range

Dim row, col

row = 0

col = 0

Dim Cell As Range

For Each Cell In myRange

If Cell.row row Then

If row 0 Then

f.write Chr(13) & Chr(10)

End If

row = Cell.row

End If

f.write Cell.Value

f.write Chr(9)


'close the file and release objects


Set fs = Nothing

End Sub

I need to write a macro that will append text to all selected cells. Is this possible?

I've been using a function that I found here yesterday, but I need something that will auto adjust as I have lots of different sections and different things to add to each.


Sub AppendReturn()

For Each c In Range("A263:A486")

c.Value = c.Value & " mytext"

Next c

End Sub

The above is working, but is there a way to append text to every selected cell? I know nothing about VB except what I taught myself yesterday, so I don't know all the functions etc.


I am trying to figure out how to move a variable number of rows from an excel worksheet and append them to an exisiting .csv file or separate workbook.

The active worksheet is populated based on non blank status of fields on other worksheets with the workbook, so there are 10 rows of formulas.

What I want to do is dynamically open a secondary storage file (preferably an excel workbook but I can live with .csv) and append only the rows with values and then close the secondary file.

Each row contains 11 columns of data.

I am not fluent in VB and have been searching the net for possible solutions but although I have found several similar function they seem more complex than necessary.

I have a text file "Data.txt" stored in C:\ with many records in the following format. The records are written into the text file from an external program.


I need a macro that reads the records from the text file and append into a worksheet. Once all the records are read and copied, the contents of the text file should be deleted.

Thanks in advance


Hi everybody,

My name is Stefan and I have a question (sorry I haven't contributed to this forum yet - this is my first post)...

Let's say I have 100 text files on my hard drive in C:\folder1
Let's presume I have 100 text files on my hard drive in C:\folder2

Each file name from folder 1 is also present in folder 2, but the contents (txt) are different

So here's the question that puzzles me a long time now... when 2 file names residing in different folders are identical, is it possible to append both text files and export them to C:\folder3

I have the following set up in mind
- all file names from folder 1 + file path in column A ... e.g. C:\folder1\text1.txt ... etc
- all file names from folder 2 + file path in column B ... e.g. C:\folder2\text1.txt ... etc

Is there an easy solution to accomplish this with Excel 2003?

BTW, I have no VBA programming skills, so..., much obliged to anyone who can help me out here!

With kind regards,


Hello all

I am looking to import specific data from a text file (only certain lines). I assume using VB code is the way to go, but am not sure what the code should look like (I have done limited VB programming).

I am looking for code that will:
1. When run, will ask me for the path (let me browse) to the file location (but I could hard code path).
2. Will import (read) only certain defined information and append the data to the current data column. The file is like:

Box1_a, 10
Box1_b, 15
Box1_c, 20
Box2_a, 25
Box2_b, 30
Box2_c, 35
Box3_a, 40
Box3_b, 45
Box3_c, 50

And I just want to import the values of lines 1, 4, 7 (10,25,40). These values would be append to the data from the previous import.

Any ideas



I have an application that generates a file. I can give any kind of extension
name to this file generated. I have full control on output generated in this
file. Meaning, I can put quotes, single qute, tab, etc anywhere I want.

My objective is to open up this file in Excel. When I do that, some text
like "00010010" ends up becoming 10010. How do I avoid that from happening.
Note that since the file extension is already a ".xls" or a ".csv", Excel
opens it up right away, rather than going through a formatting steps that I
would normally go through for opening up a ".txt" file.

What I have tried so far is
1) "00010010"
2) '00010010'
3) '00010010
None of these produces the desired result. I would appreciate any help
provided. thanks in advance.

Hello all,

I'm attempting to append multiple times to a cell. Below is a test code I wrote (not my actual code, but this mimics the issue):

HTML Code:

Sub testfile()
Dim I As Long
For I = 1 To 50
With ActiveSheet.Cells(1, 1)
    With .Characters(Len(.Value) + 1, 1)
    .Text = Chr(10) + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    End With
End With
Next I
For I = 1 To 50
With ActiveSheet.Cells(1, 1)
    With .Characters(Len(.Value) + 1, 1)
    .Text = Chr(10) + "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
    End With
End With
Next I
End Sub

When this is run, it only includes three instances of "aaa". Does anyone know why this is?

Thanks for your consideration!