Each month I am sent a spreadsheet which contains a list of 100's of different file paths (including file name).
For example (Quater 1 is the document name) R:ManagementJohn2008SalesSectionAQuater1
I would like to remove the file name from the file path (I will then convert the file paths to hyperlinks which will open the folder the document is stored in but not the document itself.
A have a CSV file which contains a string of data that has a repeating pattern e.g
1234561234560N12343159753 00Company 123 Mr Smith 9874561236540N12343159753 00Company 432 Mr Jones 654987159753680N12343159753 00Company 431 Mrs A Bruce
The first long string of numbers are bank details (Sort Code, Account Number) followed by our company bank details then company name, then a reference number then the name of the account holder.
There are over 20000 records all in one long string of text and all contained within cell A1. There are also a few occasions when there is no space between the name of the account holder and the start of the next persons bank details.
What I need is for there to be a split after each account holder's name and for each persons details to be on a new row e.g
1234561234560N12343159753 00Company 123 Mr Smith 9874561236540N12343159753 00Company 432 Mr Jones 6549871597530N12343159753 00Company 431 Mrs A Bruce
Ideally I would also like the first string of information to be split in to columns so that it reads as so -
123456 123456 0N12343 159753 00Company 123 Mr Smith 987456 123654 0N12343 159753 00Company 432 Mr Jones 654987 159753 0N12343 159753 00Company 431 Mrs A Bruce
The first collumn would contain the first 6 digits, the 2nd would always contain the next 8 etc. I have tried using the Text to Columns function but it gives me seperate columns for initals etc when I would like the full name and title in one column.
Below code is for splliting text file into multiple excel worksheet. I want to modify it to splitting text file into different msword documents in folder. Is it possible to change the code
Sub LargeFileImport()
'Dimension Variables Dim ResultStr As String Dim FileName As String Dim FileNum As Integer Dim Counter As Double 'Ask User for File's Name FileName = InputBox("Please enter the Text File's name, e.g. test.txt")
I've got an Excel document that is generated from a third party programme (See ExcelDoc attached)
I'm trying to manipulate it so that a macro creates a CSV file like the one attached (see THK.csv)
I need to have the following columns in the CSV file populated using the Excel spreadsheet
Column A: Will need to have the NUMBER that is in cell B2 of the Excel file in this case the number is 0714 (need to keep the preceeding 0 too)
Column B: Will need the phone number Column C: Will need the fax number Column D: Will need to have the email address Column E: Will need to have the date only Column F: Will need to have the Order Number Column G: Will need to have the Customer name Column H: Will need to have the Customer telephone number Column I: Will need to have the Customer alternative telephone number **Column J: Will need to have the 1st line of the address (after First Address in xls doc)
I've managed to get a macro that will take the information and transpose it into a new document and rename it as an CSV file but I am having a lot of problems trying to get the macro to create the CSV file in the format that I need (see following macro)
I've attached the xls document (the one that is generated and the CSV file which is the format I'm trying to achieve.)
**This cell is generated and will have commas at the end of each line of the address and will be terminated by a period (at line 4 of the address. Sometimes there will be 4 lines to an address but sometimes there may only be 2 or three. In the case where there is no information I need to have a blank ( null) value in the cell
I have an excel spreadsheet that has over 10 thousand rows and is 40+ Mb in size. It is giving me timeout errors when trying to import it into Joomla 2.5. Therefore, I need a way that I can easily split the file into 5 smaller files. Here are the column headers: titlemetadescmetakeyaliascategory_pathstateintrotextaccess
I tried doing it manually but is said the cell sizes were different...
On this forum, a script is provided to break a large Excel file into smaller 500-line files:
Split Worksheet Into Multiple Files By Every Nth Row
I copied the code and pasted it into the VBA editor in Excel 2007, but when I run the macro, it generates an error message: Runtime error 91: Object variable or With block variable not set.
The line the debugger identifies as the one with the error is this one: For lLoop = 1 To rLastCell.Row Step 500
Here is the full code from the previous thread: ...
I am trying to make my macro more dynamic for a spreadsheet I am working on. I have this code which splits out worksheets (using the specific names of the worksheets-not dynamic) from a main workbook into template workbooks (which are basically just an empty workbook because I didn't know how else to do it) and then saves them using the paths below. I would like to make this more dynamic by splitting the different worksheets into new workbooks based on a key column in the hierarchy worksheet.
Basically I have a list of accounts in column B with the file name they should be exported to in column A. There are about 30 accounts being split into 6 different region files. Also note that the same account might be listed multiple times in column A (needed to add multiple numbers for other lookup formulas in the worksheets) but that account worksheet will still only be going to one of the six region files and not to multiple regions. After these are copied to an individual file I would like to save it to a location on my computer. All files will go to this location.
VB: Sub Create_Subfiles()
Dim FDMName As String Dim FBName As String Dim DIYName As String Dim WMName As String
I have a variable list. Each column will be 250 digits and numbers of rows will be variable. I want a macro to import a text file from a specific folder into a sheet without split it to columns. So we will work only in column A
Then macro will find B1002 wording in A1. if it is exist, it will copy the next 36 digits after B1002 wording if not then it will search A2 row. The next step will be to search and find another wording "B1001" if it finds it will replace copied 36 digits text. If it can not find B1001 wording it will go to upper row and search B1001 wording here and paste the text. This will go on till row shows #END. This means it reached the end of the list. And then macro will save this file as text file to another folder.
So macro will go to beginning to open other file in the folder and this will go on till last file in the folder.
This is the logic of the macro. Here is the sample of what I want.
I'm using Excel 2000 and I have a spreadsheet with 4 columns (A-D) and many (500+) rows.
Part 1: ######################################### Colums A & B both contain identical data - a first name and a last name in the format "John Doe".
I want the second word ("Doe") removed from all cells in Column A so that only the first name remains, and I want the first word ("John") to be removed from every cell in Column B so that only the last name remains.
So, where A1 & B1 both started with the data "John Doe" now A1 contains only "John" and B1 contains only "Doe". #########################################
Part 2: #################################################### Column C contains addresses in the format: "#5 - 123 Fake Street, Some City, CA 90210"
There is ALWAYS a comma and a space after the street address, then the name of the city or town followed by more data which may include one or more commas.
I would like everything BEFORE the first comma to remain in column C, and everything AFTER the first comma & space to be moved into Column D of the same row. The first comma and space are not needed again.
So, where C1 started with "#5 - 123 Fake Street, Some City, CA 90210", it now only contains "#5 - 123 Fake Street" and D1 now contains "Some City, CA 90210". ####################################################
I'm trying to take a large text file and break into smaller text size files. I want to open the data file, and parse into 5000 line smaller files.
Here is what I have based off of some MS KB Sub LargeFileImport()
'Dimension Variables Dim ResultStr As String Dim FileName As String Dim FileNum As Integer Dim Counter As Double Dim CounterMax As Double Dim sPath As String Dim FileCounter As Double 'Output File
Part I... I got the answer 1987, and now I want Excel to take the numbers out and display... 1 in one box then i set + in the next, then 9 in the 3ed. box, next box +, then 8, then +, then 7 in the last so that i can have Excel make a SUM of it all to 25.
How do I split 1987 and put the numbers in different boxes?
Part II... I want to make A=1 B=2... all the way up to 9, then start over again with J=1 K=2... up to 9 again and then over again.
So that if I write my name it comes out as a value of 14 (Odd = O=6 D=4 D=4 =14)
(AJSØ=1 BKTÅ=2 CLU=3 DMV=4 ENW=5 FOX=6 GPY=7 HQZ=8 IRÆ=9, It's the Norwegian alphabet, that's why there are some extra letters)
So how do I set up my Excel so that is ANY name is typed in I can get it out into a number from the values assign?
Here's my problem. I have a cell where there are many data strings seperated by ",". Each data string has a seperate value of its own like for e.g: A2: aa,ab,ac
String Value aa 1 ab 1 ac 3
What I want it accomplish is that, split the A2 cell into the different data string entities seperated by ",", then get the corresponding value of each of the data string entity, and to take the average of all the values of the different data string entities.
VBA coding for automatically saving an excel file as another file using the current date as part of the file name together with "32ga" as a constant add-in. I also what this macro to run at a particular time of the day let say 00:20hrs. The excel file i want to save as is always open . It has data that changes every 24-hrs.
I have a template file for ordering trafolyte and steel plates. I have added macros to this template file. The existing macros do the following (shortly described):
Macro 1: clears order Macro 2: update order date + send a read only file to the supplier of plates + save a read only copy of the file into one of three folders acc to info in one of the cells.
It's the Macro 2 I want to edit.
I want to add a "function" which copy a selection of data.column A to N from row 12 to 548 but only the rows where there is a value in column A.
Row 1 to 11 includes standard order info and Macro buttons. Row 11 includes the heading for order data.
For everytime someone click on the Macro 2 button in the template file, I want the selection to be paste into the first "available" row in a "Total list" file.
The "Total list" file may have to be open (or a function to open, paste selection and then close the "Total list" file may be added)
File and Folder info:
To simplify suggestions, the following file and path info can be used (I can change to the correct later): Template file name: template_order.xlsm Template file location: \servershared emplate
Total list file name: total_list.xlsx Total list file location: \servershared otal
Selection info:
The template file exists of a "general order info area" A1:N10 The column heading for order data is located at A11:N11 The selection to be copied is A12:N550 - But only rows where column A includes data (not empty). (If the spesific order consists of 14 plates than there will be item no 1-14 in column A and I then I want to copy A12:N25 (row 25 will be item 14).
When I try to use record macro it looks like it only records what's happening in the template file - It doesn't record the pasting in the total list.
Is there a way to display that information on another sheet so that each individual product is on its own line with a QTY of one? I can do it with VBA but was wondering if there is an alternative?
I was multiplying 2 ranges in an formula to get a cell's value. The first was a set of user inputs and the second was an array of constants. Recently I needed to add another field in the middle of the user inputs which subsequently broke the range.
I have a very long HTML code that i am using for a description of something on our website, when i save the file in CSV format the HTML gets cut up and put into different cells on different lines ... the file needs to be saved in CSV format.
I have long list of data (asett IDs). All of it is in the following format.
AA-BB-CC-CC001
The number of dash occurrences can vary based on the level the asett is located in. I need to extract the parrent of the asett to adjacent column. the parrent for the above example would be:
AA-BB-CC
The parrent is the values before the last "-". There can be as many as 10 "-"s and as little as 1 in the asett ID.
I have been looking at the split and trim functions in excel but I have not been able to define split/trim by last "-".
I am putting together a macro that takes hours worth of work away by doing all the calculations and splitting.
I have managed to do all the basic stuff but this is a little more complicated.
My spreadsheet has a couple of thousand rows of data, i need the macro to check for the following:- If DATA14 (Column N) = YES and RATE (Column D) = 21.81
I need this line splitting into two to replace the original. (would be better if i could move the original data to another sheet to show the ones that have been split)
One with 87% of the rate One with 13% of the rate (Data8 will always = OLHA on this row)
Then the total will be recalculated based on the new rate.