Simple question: Can an Excel Macro insert a line of boilerplate text under the last thing copied to a worksheet? I want to paste something into a worksheet, and add a message under it, and a blank line.
I have a workbook that usually looks something like this
Category Product No description Price
Balloons 12345 Red Disney balloon .50 Balloons 12567 Blue Princess balloon .86 Balloons 76521 Angry Birds Balloon .80
Kites 23456 A Big red Kite .27 Kites 22222 A small blue kite .06
Banners 10000 Party banner .33
I need to find a way to copy the category below an empty row from column A and paste it in the blank row in column B . If possible to bolden the text but I could probably work that bit out myself. I'm new to this but have used VBA before to run macros.
I have a spreadsheet where on a weekly basis data is copied in to various tabs. I then have a "formula" tab where I have a single line of formulas which look up the various data tabs and extract the results I want to show.
Currently each week, before I import the new data into the various tabs, I copy the last row in the "formula" tab and paste to the line below it. This contains all the working formulas. I then paste values only on the line that I copied, thus "locking in" the values it calculated with that weeks data. This means that each row then contains the results with that week's data, and this will grow week by week.
What I am looking for is a formula that automates this process. So let's say that row 30 is the final row of data on my formula tab, it contains the formulas I want to use. I would need a macros that does the following:
1. Looks up last row (row 30) 2. Copies last row (row 30) 3. Pastes to next empty row (row 31) 4. Pastes values only to second last row (row 30)
I'm not too great with writing macros, I've found plenty that can find the last row, but I can't get them to work to highlight that row.
I currently have a 200 row table spanning 10 columns. There is one numeric column and the rest are free text. The table charts the different contents on one of the shared drives here at work. The drive is frequently in use with things being added and removed from it.
I have an excel table already which can sort the contents in order of size (numeric row) or name of the folder (the first text column). I have two buttons at the top. The first inserts a row, which I did by recording a macro and then copying the code into the button.
The second I would like to do the following: When a user selects a cell in a row, the button, then clicked, deletes the entire row. Not just the data in it, but excises the row itself and stitches the surrounding materials together. The code to delete a row I could obtain easily, but I can't work out to say "find the selected cell, and take out the row it belongs to".
I have a large spreadsheet of demographic data. In column A there is a name, in column B there is Address1 and in column C there is Address2. First I need to insert a new line under each line of data. Then I need the Address2 data (column C) of each line to be copied/pasted to that new inserted line, but in the Address1 column (column B).
I currently have a macro that does several thing, i want to add another task.
I need a row inserted everytime there is a change in column H from "0" to "F" only. The infromation will always start in row 8 but the last row is not always the same, it will be different every time.
ABCDEFGHI112345678223456783#N/A#N/A#N/A#N/A#N/A#N/A#N/A45B=Bi-WeeklyID type 2ID Type 308 GAPamount due6HCCompanyS= Semi-MonthlyCO#NAMEFORMER (F) or Current (0)78546WalreBbr55a234amy01009524WalreSn32m56daniel05001041WalreS589653jode0100011945WalreBef343456caryF2001212WalreSg5365M5665mikeF40013Grand Total2,200.00
I have two sheets that i am working with sheet1 and sheet2.
I need a macro that will insert multiple rows in row 8 of sheet 1.
I also need it to copy the formula from row 8 sheet1 to every new row inserted.
the number of rows inserted will depend on colum A from sheet2.
*column A contains numbers, and the amount of numbers will vary. The data starts in A11 and continues down.
So for example. if sheet 2 column A11 and A12 and A13 are the only cells that contain numbers, then the macro will add 3 lines starting in row 8 of sheet1 and it will also copy the formulas from that row to every new row inserted.
Worksheet excel with multiple lines and colums. I need a macro to automatically insert a new Line where the cursor is located, and duplicate data from previous cells: let say cursor is located L10, macro will insert L11, and duplicate L10 -C1 data to L11 -C1. I have a macro that does this function, but the Line insertion is always at the same line.May be the macro should "read" first the cursor position, Lx and then move down +1 line prior to duplicate the data.
I need to add a line on the top of a new worksheet with the data copied from another worksheets cells. Using a macro. The line has to be created everytime on the top of the new excel sheet with the previous data moving one down.
Each cell in Range("A1:A2000") contains a remark, each phrase or remark is Between 5 & 70 characters all written without line feeds (carriage return,i mean Alt Enter) Just spaces between words. What I would like to do in every cell is to force a line feed (Alt Enter) every 10 characters, and if the 10th character happens to be in the middle of a word I want the line feed to be inserted at the end of this word. Note that the phrases are not necessarily multiples of 10.
what I am looking to do is when in colum AA a cell changes to "Drawdown" I'd like the cells in column A:D,F,H:L,N:Q,S:Z on the same row to grey out and a line to be insert below the cell that was changed, if it selects "Fee" , cells in A:D,F,H:L,N:Q,S:Z on the same row.
I have writen the following butit seems rather cumbersome and I can not get the insert line to work.
Code: Sub Worksheet_Change(ByVal Target As Range) Dim WatchRange As Range Dim IntersectRange As Range Set WatchRange = Range("AA1:AA500") Set IntersectRange = Intersect(Target, WatchRange)
I need to do two things in my Excel spreadsheet: 1) I want it to insert a blank row everytime a value in the 1st column changes. 2) In the blank lines, I want to do a COUNTA for each of columns G through N. If I can get the program to insert the blank rows...they will not be a set # of records apart...some will have 3 records & some might have 17 records. Is there a way to automatically cause #2 to happen instead of having to choose the function icon and then tell Excel the first and last cells in each range?
I am brand new and I don't know a ton about macros and programming in Excel.
What I'm trying to do here in this attached spreadsheet is at the end of inputting my line, I want to hit the tab (marked in red to make it clear where) button in the cell and have it automatically create another blank line but keep the formulas the same.
Basically I just want to avoid having to right click and insert line and then drag the formulas column by column down which is difficult.
See attached : TEST2_2014 Sales & Commission Spreadsheet.xlsxâ€Ž
I can't seem to make user-defined format that puts a text in front of a number and/or a text.
Let's say I have A1: 13, A2: texttext A3: text7 and I want to format a lot of cells to "Ilike 13" / "Ilike texttext" / "Ilike text7"... ie add the same text in the front of the cell, no matter what the content is.
I did manage it seperately, with "texttext" @ for text and "texttext" # for numbers, but what's the general one?
Removed screen shots - Please DO NOT use actual personal information, sample data only! - Moderator
Some of the people on this list have a second name entry on the line below their first name entry. ALL of the people on the list have an Address2 on the line below their Address1.
How would I move the second name entry into the cell next to the first name entry, and then concatenate them, and then also move the Address2 entry into the cell next to Address1 (but not concatenate these)?
I am entering large amounts of text into a text box uisng VBA code.
In VBE I need to line break the text using "space _" in order I can keep the text manageable on the screen. Problem is VBA is telling me there is a limit to the number of line breaks I can have in a sub, how I can solve this, ideally would like to paste a para of text at a time.
I'm using the following code to read a text file that I downloaded from a mainframe file.
Do While Not EOF(FileNum) Line Input #FileNum, myLine Debug.Print myLine Loop
It reads and prints the first line, but then drops out of the loop. According to the help file, "Line Input" is looking for a carriage return (Chr(13)) or carriage return–linefeed (Chr(13) + Chr(10)) sequence. I have pasted a sample of the text file below. I'm not sure what the characters are at the beginning of each line, but perhaps I could find a way to replace each of them with a carriage return.