I need to have a macro written which will allow me to extract information from any given workbook and copy them to my workbook. I'm thinking along the line of creating an input box upon opening the workbook, asking for the name of the workbook which contains the data. I would then use the data from the workbook and extract bits of information which I would copy to my current workbook.
However, I can't seem to figure out how to direct the answer of the input box to extract the information out of the target. And how would I refer to the workbook with the data in my code? I would need to refer to the data workbook as I need to extract information from it.
I would like to extract some data from a web page, but only part of it. The website is:
[url]
and I have a spreadsheet with many different ProjectId hyperlinks in a column (the final six-digit number). All I want is the large block of text that is in the middle of the page. Sometimes there is no text, as in:
[url]
So I don't know how to deal with that either...
I would just like to paste the text into a cell adjacent to the hyperlink. I know that there is a visibility issue with 1024 characters, but can cope with that (no text will be longer than the 32k+ chars).
Any help would be appreciated - it's for my wife's PhD, and I just want to make it easier on her. I am reasonably ok with macros, but am by no means expert! If you need clarification,
i have a data as above, i wanna to extract the 250ml from the column 1, only 250ml (basically i want to extract the size code like 150g, 100gm from the data above).
I have been confronted with an issue that has bugged me: Now do I extract a part of the string according to lets say "markers"?
Here is what I mean:
I use the code below to get the bottom range of my tables:
Code:
blimit = Activecell.Address
I haven't had problems because my tables were small, then I would:
Code:
blimit = Right(blimit, 3)
If the table was small there was no problem, since lets say the Activecell.Address = "$C$123", resulting in blimit = 123.
My how do I extract a part of the string, knowing I have 2 "$" ? That way I would make a version of this that always works.
I cannot use FIND or any formulas I am aware of since they all start counting from Right to Left... I thought of using Replace() to get the first "$" and change it for something else like "-" then looking for the second "$". But Replace() basically changes both signs... making my idea... well obsolete...
Now do I extract a part of the string according to lets say "markers"?
Here is what I mean:
I use the code below to get the bottom range of my tables:
Code: blimit = Activecell.Address I haven't had problems because my tables were small, then I would:
Code: blimit = Right(blimit, 3) If the table was small there was no problem, since lets say the Activecell.Address = "$C$123", resulting in blimit = 123.
My how do I extract a part of the string, knowing I have 2 "$" ? That way I would make a version of this that always works.
I cannot use FIND or any formulas I am aware of since they all start counting from Right to Left... I thought of using Replace() to get the first "$" and change it for something else like "-" then looking for the second "$". But Replace() basically changes both signs... making my idea... well obsolete..
I have 2 sheets in a file. One is given to me from our parts department containing all parts on a given truck model. The 2nd sheet is exported as a database file from inventor and imported as an update able sheet in excel.
I am needed to compare part numbers between the 2 sheets and the qty of each. So far I have it where it matches the part numbers and turns the ones I don't have in the model red. Now I'm trying to match the part numbers and pull the qty of said part from sheet 2, the imported one, and compare it to the to the qty in the 1st. All I really need to accomplish is matching the part numbers then copying the qty from sheet 2 to sheet 1 onto a new cell of the matched part number.
I have to sort list of thousands name (3000 names) and remove duplicates. My problem is majority of the names have their title (i.e) Prof. Dr. Ir. Sir. etc typed in, so I need to copy the title in different cell and have their name only. Here's what I expect:
Current List ----> Column A -->Column B Drs. H. A. Andrew Boston, MRE. ----> Drs. H. --> Andrew Boston, MRE Drs. H. Andrew Smith ----> Drs. H. --> Andrew Smith H. Abd. Mohammed Junus ----> H. --> Abd. Mohammed Junus Prof. DR. Jane Doe, MD ----> Prof. D --> Jane Doe, MD Prof. DR. Ir. H. Randy Wong, MBA --->Prof. DR. Ir. H. -> Randy Wong, MBA Dra. H. A. Karen Patel ----> Dra. H. --> Karen Patel Drs. H. A. M. Kangkong ----> Drs. H. A. --> M. Kangkong Prof. Drs. H. A. Kareem Saleh, Ph.D -> Prof. Drs. H. A. ->Kareem Saleh, Ph.D Dra. Hj. Nina Schorder ----> Dra. Hj. --> Nina Schorder Ir. Abdul Jabbar ----> Ir. --> Abdul Jabbar
These cells contain a time reference either in '09:30 - 16:30' format or just an 'AM/PM' format.
What I need to do is to populate column B with the part of the string that comes AFTER the times in the text (either in hh:mm format or AM/PM format)
Example 336 Data 2012 Classroom Induction 2012/08/28 09:30 - 16:30 data about this ------> data about this 336 Information about this 2013/04/04 09:00 - 13:00 Information 2 ------> Information 2 336 info CHS Suffolk 2013/05/07 PM DRC, BSE ------> DRC, BSE 364 information 2013/02/12 AM DRC, BSE ------> DRC, BSE
I cannot get this to work and cannot use Text To column as there is no character I can use to split it.
Ive wrote some code that goes into a workbook. This code then opens up a "master" workbook which has 18 blank tabs in it and then proceeds to open up 18 other named workbooks one at a time and copy some date from these workbooks to the master (i.e workbook 1's data goes to the master workbook on tab "1".)
I have this working no problem but here is my snag.
The workbook name changes every week to correspond with the date (i.e 1_14DEC2011.xls then 1_21DEC2011.xls).
Ideally id like to be able to create a variable for the latter half of the filename so that i can apply this variable to each filepath but i cant quite get it to work.
A small sample of my code is below (and yes i know it is very blunt but so is my knowledge at this stage!)
Code: Sub collate() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual
Now this works perfectly fine, but I am wondering if it is possible to replace 2013-004 so that it reads the text from a cell on that sheet to complete the file name.
I want to replace the 2013-004 in B1 with text from A1. I have tried multiple methods but it just always assumes it is part of the file name or breaks the formula.
I've run into a roadblock in excel 2003 in trying to create an accounting spreadsheet that will pull in information from several separate workbooks (invoice files) using formulas which substitute invoice Nos. (which coincide with the tab/worksheet names).
My obstacle has something to do with order of operation/calculation I presume... I've successfully used labels to bring in information from separate tabs on the same file by using the substitute function with generic formulas.... in this case exel processes the formula, likely because it calculates the linked information first in its order of calculation; then trys to substitute information into the result of a calculation already made....
I'm trying to find a way to tell excel to look at respective cells in the same file but on a different tabs/sheets...
For example; I've been trying to pull in the date an invoice was issued for client "X".
I plug in a formula in a remote cell of my accounting spreadsheet "Y" which basically says to bring in the value on file ["X"]; worksheet "tab"; cell $J$11 - where "tab is just a filler that I would like to use the substitute function to exchange with respective invoice Nos. (i.e. 049; 050; 051; etc.) My hope is that by adding these 3-digit sheet identifiers; all other information from respective cells (in file "X") will be pulled into my accounting sheet - file "Y" (i.e. invoice total; applicable pst; gst; expenses; etc.) I have written as many formulas as required for the different types of info sought after, the only variable being the 3-digit worksheet identifier. The problem has been that excel first processes the formula in the remote formula cell(in file "Y"); then applies the substitute function to info already brought in from File "X"; whether it is a date value; or a currency value. I can't figure how to have the substitute function change the formula... not the result of the original function...!
I've tried to format the source formula cell as text (therefore not calculating a result at that instant) however the substitute function inherits the format of the source formula cell.
I have create a menu with buttons that are attached to the different projects of vba. This menu will be put in the server of my department so all my colleagues can take profit of the macros. Is a menu in an excel file that only contains the vba projects, not the sheets where the macros are supposed to run. My problem start when you want to open the file. It will always be in the same disk "P:COAP", and then there are more subdirectories (year, month)... so the total path, for example, this month is:"P:COAP2007200706". But every month, it changes, logically.
The problem is that i need to open a file with the name "COAP-200706 Concentració Empresa Emissora" in this case... the only thing that changes is month, and year... I want to close the booke i choose, to avoid errors, if the name of the workbook chosen is different to a part of this string. In this case, i'm trying to close the book if the name of the file or the book don't contains the string "Concentració Empresa Emissora", without saving changes, of course... because sometimes people have chosen badly the files and they've made a disaster. If the file chosen contains this string in the name i want to continue with all the code that is written after.
ChDrive "P:" ChDir "P:COAP2007" NouFitxer = Application. GetOpenFilename If NouFitxer = "" Then Exit Sub Workbooks.Open Filename:=NouFitxer If ActiveWorkbook.Name <> "*" & "Concentració Empresa Emissora" & ".xls" Then Msg = MsgBox("Error in the file opened. Look at the name of the file next time." _ & vbCrLf & "The program will close without finishing the process. Start again. Thanks", _ vbOKOnly + vbCritical, ("END OF PROCESS")) ActiveWorkbook.Close Savechanges:=False Exit Sub End If
so this gives a part number depending on what number is placed in O6. What I need to do know is look at 2 different cells and for each combination of numbers give a different part number. so if A1 is 2 and B1 is 3 give a certain result.
I need to extract two coulms (AQ,AR) from a workbook with 31 tabs, I want colated the same colums from each one and copy into a new workbook. I have been searching for hours but have failed.
An excel file with over 400 worksheets in it. I need to copy the data, a bunch of numbers, from column C, column F and column I, and paste them in a new file or worksheet all in column A of the new sheet.
All of the 400+ worksheets have these numbers I need to grab in the same columns- C, F and I.
I spent most of the day Friday cutting and pasting. I am experimenting with macros, but I am just not that good.
I have a workbook which has data from 2 different time points (6 and 12 months) and this is signified by a prefix to an ID number which is a letter (A or B) and a number:
I need to analyse data separately so I'd like to create 2 separate workbooks, once which imports all of the 6 month data (1 row per case) and one for the 12 month data.
I thought that this would be based around a VLOOKUP of the first 1 or 2 characters but I can't work out how to integrate this with an 'IF' and link it to another workbook.
I'm trying to create a macro that will allow me to extract data from another workbook (whose name and location is listed in a defined cell) and populate a range in my new sheet with this data.
Ideally, I want to be able to do this without actualy opening the source file, but any means to this end would be great!
I know this was possible in Lotus 123, but have not yet found a way to do it in Excel.
i have this code that could extract out Data from many closed workbook. I am extracting data from 2-3 thousand files and the Data in those files are rather dynamically positioned.
For e.g. My vba codings will extract data from cell B256 of the closed workbook.
Sometimes, the data might not start from that cell which my vba would still extract that non-relevant data.
Is there anyway i can modify the codings to search for the required data and extract instead of extracting it dumbly?
Sub getINFO() Dim lCount As Long Dim wbResults As Workbook Dim wbCodeBook As Workbook Dim rCell As Range
Firstly, I have attached a file called test2 which has two sheets within it, one called list and one called 12345. This is for demonstration purposes only as in real life these are both separate files.
What I am trying to do is create a history in the file called list that extracts certain data from the file called 12345 and places it in a more user friendly format. No problems with the formulas etc, just a case of a few ifs and buts.
My real problem lies in the fact that file 12345 is only one of hundreds of files and in order to create the history, I have to repeat the process on all the other files, so that the list grows as I copy the data. Again for demo purposes, the file "list" sits in the C root ie C:list and the job files sit in C:files*.*.
Is there a way to automate the process so that formulas or VBA residing in the file "list" searches through the C:files*.* and populates the list as it runs through them.
Am working on a procedure to open all files in a folder and copy some data from the files into another workbook (master). I have this piece of the code. However, I also need to get the filename (from which data was copied) and paste this into an adjacent cell in the master (so I know which file each data point came from).
Is there any way to remove the first part of a string of text in a cell and save the second part?
The first part of the text string is a team code that has a variable number of numbers, capital letters and sometimes spaces. The second part of the text string is a variable number of words in a team name that all start with a capital letter and have lower case letters. Every line has a different team code and team name.
The original spreadsheet also has a column with just team code. Is there a way of using this column to "subtract" the team code from the text string to just leave the team name?
I'm having a problem with getting a result from another workbook. The purpose is to extract information from a closed workbook representing data from a country (ie US.xlsm, UK.xlsm) into the open one (summary). I want to count the number of results in a column which are above a certain amount (in this case 100).
Which works no problem for getting the number of results in the E column above 100. my issue is that I want to be able to change the name of the country in a cell, and then get the results automatically from the relevant workbook. I've been using CONCATENATE for these purposes and EVAL (from MOREFUNC)... and I get #REF!
So if I split up the above coding into two cells "=" and "SUMPRODUCT(--(('C:address[US.xlsm]Worksheet name'!$E$2:$E$30000)>100))" (just to keep it simple) and then use CONCATENATE to combine them in a cell. Using EVAL on that cell gives me #REF!
I've tested SUMPRODUCT with EVAL and CONCATENATE on formulae like the one above which do not link to other workbooks, and they seem fine. and SUMPRODUCT and linking to a workbook also works fine in the first example.
So the problem is somehow coming from the combination of SUMPRODUCT, EVAL and accessing an external sheet.
I wanted to know if there is any way possible to get vba to insert a formula in a cell to each worksheet in each workbook in a folder and then using loop to extract all the info from each worksheet of each workbook in same folder into a master workbook?