I am playing around with code to extract stock prices from Yahoo! Finance.
The data is extracted from Yahoo in the form of a CSV string, for example:
I've written code to split the string into cells as I'd like, but just realised that if I copy the above text manually from the Immediate Window (on the back of a Debug.Print) and paste it anywhere on the worksheet Excel automatically splits the string and reformats the values.
Although my code works perfectly I was wondering whether there is a shorter way of doing this, i.e. by just coding up the above action? I've tried a few routes but haven't found a solution yet.
I'm looking for a short snippet of code to cut all rows with the string "W2 - No P.E Kit" in column E of the Raw Data tab into a tab called No kit. I don't want gaps in the rows of the Raw Data tab however.
I need to open a text based file (not a txt file), read the data in as a String. Split the string and paste into a worksheet. The string really has 2 delimitors a & and a =.
Ideally, I would like to keep only what was between the = and the &. But would settle for splitting the string by &, then putting token to left of = in one column and token to right of = in the next column. The first sounded cleaner, but I'm getting desparate.
This didn't sound hard when I started, but I've never really done VBA before and it has been posing a much greater problem than I thought. I've tried several things, but this is the latest rendition. Am I thinking too much in terms of C++ and Java? ...
I am using a macro that copied a string from another app, and I would like to know if there is a way to remove the sign "_" (underscore) before it paste to the TextBox1?
I declare the textbox as : TextBox1.Value = DATA
When the macro run, it takes the info from the app and send the string DATA to the TextBox1.Value, however there is ugly _ from the data. I want to be able to remove that sign right after it paste into the TextBox1.
I have a report where I would like to have a macro search for a date string in columns N-S and copy the date to Column C, same row. The number of rows will vary from day to day. I would then like to format all of Column C to 'mm/dd/yyyy'.
Attached is a file where the date string is included in Column N on row 2 and Column O on the row 3. The dates for both these lines would need to be copied and pasted to their respective rows in Column C.
My Excel workbook is composed of 2 sheets. The first one is a Dashboard (Sheet1) and the second one (Sheet13) is where the data is.
I would like to press a button on the first one, enter the text to be found into an Inputbox and then copy-paste cells from the second sheet (containing the data) into the first one.
The data is structured in rows, from A to V columns.
I would like, according the row where is located the found cell, copy given given cells from Sheet13 to Sheet1.
Right now, I have a macro performing the search like desired and selecting the found cell :
Code: Private Sub CommandButton1_Click() Dim FindString As String Dim Rng As Range FindString = InputBox("Entrer le contrat de support - rechercher (DSI....) ") If Trim(FindString) "" Then With Sheet13.Range("V:V") Set Rng = .Find(What:="*" & FindString & "*", _
I would like to copy cells located in the columns A, B, D, E, F, K, S, (T:U) from the row where the searched string has been found in Sheet13. It has to be copied on Sheet1, on two rows : (N29:Q29) & (N30:Q30).
When a new research is done, the previously copied cells should be cleared out.
2. The second point is about duplicating a button with an associated macro. The macro is running like I want but I have to insert 299 more buttons, with the updated formula according to the row where it is located.
However, one part of the macro has to stay the same because all of these 300 buttons increment a single counter located on Sheet1.
Code: Sub Button2600_Click() If MsgBox("Etes-vous sûr de vouloir ajouter 1 année de support pour" & vbNewLine & Range("E7") & " " & "(" & Range("F7") & ")" & " ?", vbYesNo + vbQuestion, "Modification du Contrat de Support") = vbYes Then Sheet13.[A7] = DateAdd("yyyy", 1, [A7]) MsgBox "Contrat étendu d'une année." Dim x As Integer x = Sheet1.[R11].Value Sheet1.[R11].Value = x + 1 End If End Sub
You can get the excel workbook at the following link : [URL] ....
I want the same affect as copy a table and pasting into the email. So i guess i need to copy a range and save as html in a string. It seems like it would be simple since its just copy and paste into the email, but i've been unable to find anyting on it.
In Sheet1, column Y looks into Sheet2 and returns the status of that specific order - the result displayed in column Y will be either blank or a variety of text strings (eg. received, pending etc).
I need to make a macro that looks into all the cells of column Y in Sheet 1 and copy/pastes as value into that same cell only if the formula in that cell returns text string "Received". It should not affect the other cells where the formula is returning either blank or a different text string.
I was wondering if it's possible to unhide a row directly below one that is visible?
I am creating a template for users that allows them to choose which lines (rows) they would like to use. They then hit a button to hide all the other lines they don't wish to use.
For each row that is visible I then need the row directly below it to become visible so that the user can enter associated information.
I'm stumped on how to do it. I have the user entering "a" in column A for any row they wish to keep - but I'm not sure how to incorporate this into unhiding the row below (or if I'm on the wrong track with my thinking).
I've been working with this script to import and paste a webpage to a worksheet. Once the webpage is on a worksheet I can pull it into VBA easily enough but I was wondering if there's a way to "paste" the webpage directly into an array in VBA and skip the paste to worksheet step?
Set IE = CreateObject("InternetExplorer.Application") With IE .Navigate theURL IE.Visible = False End With
I have developed an extensive program running on excell but with the user only seeing userforms. I would now like to build in a "print screen" button, but have no idea how to do this.
What it needs to do is capture the userform and all its entries (as it is displayed on the screen) and send this to the printer to be printed as a picture. I am assuming that there must be code available so that when ever the user clicks this button, the standard windows (or excell) print screen appears from which he will be able to choose the printer etc.
I have found some code that allows me to email directly from within a workbook, but the example only contains one addressee, I wish to send to 3 or 4 different addresses, these addresses would remain constant once entered. How do I alter the code?
Sub sendactiveworkbook() ActiveWorkbook.SendMail _ Recipients:="type-in-email-address", _ Subject:="New Quote Raised - Test Transmission " & Format( Date, "dd/mmm/yy") End Sub
Need a code using application.inputbox to get a range, then use that range to copy and paste the range's link and format to a different sheet? The specifics don't matter, I just can't figure out the syntax. Here is what I have currently:
Is there any way to refer to a cell that is directly to the left of the current cell?
I need to create a Comma-Separated Value file with the Excel formula in the CSV file. Because of this, I do not know the current cell location, but want to do something like =(Cell directly to the left of me) + (Cell two cells to the left of me)
I have an excel file with about 200 images! This increases the filesize too much. So, I want to (if possible) have all the 200 images in different files, but still show all the pictures directly in Excel like before, without having the directly imported into excel. So, easy explained: I want to show a picture directly in excel that is in another file without having the picture increasing the filesize as before! How can i do this??
I have a large number of webpages represented by live hyperlinks in a worksheet. I need to save the webpages either as html or prefereably as text files. My current option is to save the worksheet as a html file, open the saved html file in Opera and manually right click and save these webpages to the download folder. This will save the webpage without opening it in a new window or tab.
I would like to write a macro that automatically moves vertically from cell to cell and saves the webpage without opening a browser and requires no user interaction.
I need to know the commands to have the macro read the hyperlink in the cell, got to the website and save it to a location on the local hard drive using a differently numbered filename (file1.txt, file2.txt etc)
There is no problem if a webbrowser needs to open and close as long it is done automatically and controlled by the excel macro.