Need a VBA macro that is similar to the subtotals function but without the subtotals? Basically I want the macro to look at column A and say, for each change in column A insert a blank row… I don’t need to worry about the sorting, I just would like to know how I can tell a spreadsheet to look at a column find changes in that column and just insert a blank row. On the second page of the attached spreadsheet is an example of the desired output… I will probably use this for many different spreadsheets so the simpler and more versatile the better, ie I can change the column I want the macro to look at.
I would like to be able to add vb code to my developing macro that searches within 1 column for the last instance of a particular word, then inserts a blank row under that word. All the data is sorted, so the words will be used multiple times, but I need the row to go under the last instance of each word in the column.
I have spreadsheet with data all over. I want a macro which identifies the first cell (in Column A) which has the text "BNY" and insert 6 blank rows above the text "BNY" (First text in the Column).
Once, it is done - the macro should also assign names to the last inserted row.
Column A - Should reflect "Bank", Column B should reflect "Field1", Column C should reflect "Field 2" and Column D should reflect "Field 3".
And after the names are assigned - It should also highlight the last inserted row in Yellow.
For Example: Raw Data (Snap): Bank Field 1 Field 2 Field 3
JPM 123 456 789
[Code] .....
Output (After Macro): Bank Field 1 Field 2 Field 3
Is there a way to insert a blank row between every row with data? This is for very large spreadsheets when adding blank rows individually is not an option.
Example:
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
I am having an excel file in which there is information about 100 products. Every product has around 10-15 features. This way I have 1,000 rows. Every product has its own unique ID i.e. every 10 rows have the same ID thereby making 100 ID's. Now I want to insert a blank row every time the product ID changes so that I can discriminate better between the products. Is there some formula?
A A A A A B B B B C C C C
I want to insert blank rows before B and C. If the number of features were constant, it would have been easy for me.
I need to insert blank rows at the end of the each data segment to add totals for each individual. Is there a macro that I can use for this? I'm attaching an example file.
I've got a problem that's causing me a headache. i have a document with 1 column and 4000 rows (its an export from active directory).
I need to do a search cell by cell (so A1 - A4000) for any cells that contain the text "changeType". When a cell is found, i need excel to insert a new row above the current cell and insert the text "modify" into the new row (in the first column).
I am trying to create a workbook that would work as follows:
I enter values in worksheet 1 that calculate a comparison of 2 items.
I recorded a macro that pastes these 4 rows into worksheet 2 and clears data entered in worksheet 1.
So far - easy.
What I would like to do is find some code that would let me enter new values in worksheet 1, and when the macro is executed, it would find the first blank row on worksheet 2, skip a row, and paste the info.
By doing it this way, I would be able to keep adding new items, compare them and add them to worksheet 2.
In table 1 you will see that not all rows contain data (this is because i have removed it previously with a macro) the second table shows what i want the macro to do but without deleting rows:
A Hiddenrow with formula B C
[Code]....
So basically i would like a macro to search for the first none blank value in column A and copy the row to the first available blank row , it also needs to blank out that row once done. i.e row 3 would be moved up to row 2, 5 up to 3, 7 up to 4 etc etc.
The hidden rows contain formulas which cannot be deleted or my ws goes Pete Tongue.
I need to write entries into an open spreadsheet with data input on a userform.
i need to use the xlup facility to find the last used row in the spreadsheet, select the next line and then enter the data, but how to return to VBA the actual cell reference that has been selected after doing the xlup and down one row. I need to be able a total potential 31 rows of data from the userform.
I have a userform that I am using to populate a column with data. I have the following code to find the next blank cell on the first row to enter the data from the first textbox in the userform
I was then going to populate the rest of the cells in the column by changing the range "A1" to "A2" and so on. The problem I have is that not all of the cells have a compulsory entry so when the end(xlToLeft) function may not always end in the same column and the data will be staggered.
First Entry A B C D E 1X 2X 3X 4 5X
Second Entry A B C D E 1XY 2XY 3XY 4Y 5XY
What I want to do is find the first blank cell in the first row, as that will have a compulsory entry, and then fill the rest of the cells in the same column. So if the first blank cell is D1 i want to go down then D2,D3,D4 etc.
I can do it going across the rows but cannot figure it out using columns.
I have a range of numbers in a single column and I want to insert a blank cell or line below each cell in the range. Is there a quick way to do this, by not using VBA.
ram ram ram reddy reddy reddy lakshman lakshman lakshman and i want to incert blank after the end of each group and i am expecting like this ram ram ram
reddy reddy reddy
lakshman lakshman lakshman
is it possible to do with simple formulas or i need macro for this? i have huge file with lot of groups like this i can not do this manually by using filters. have look on attched sheet for better understanding.
I have table as show below and i need to insert a blank row after every row and insert a constant data on clolumn B and C and formula on Coloums D, E , F , G ,H and I
Constant data on B : INS Acc Constant Data on C : INS Desc
After importing a data set into the worksheet entitled "SPACE", I am trying to find the column entitled "Variability Cpu" and then for every cell in that column that has a value in it, I would like to insert a new row beneath that cell. I thought my code made sense, but I get the "Run-time error '424': Object required" error on the line in red below so apparently I'm missing something. why I'm getting this error (doesn't the object variable shtS refer to the worksheet object "SPACE"? Why is it saying object required?). Here's what I've got so far:
i attach my sample excel file here, book1.xls. sheet1, "input". it check the column "C" row by row and if it detect the different content data in next column, it will auto insert a new row. it will ignore the space. below is my coding:
I have the following macro that inserts a blank line when a field changes. This works fine. However I would like to use this in another spreadsheet that has several addition columns of unrelated data. Therefore I want to insert 1 (row of) blank cells only in the columns specified in the range. The range is 3 columns wide, E - G. I think I'm close, but ...
Dim myRow As Long myRow = 3 'data starting row Do Until Cells(myRow, 5) = "" ' the # is the column that changes which I want to trigger a blank insertion If Cells(myRow, 5) = Cells(myRow - 1, 5) Then myRow = myRow + 1
I have a spreadsheet that I need to insert a blank row every other row and then merge that blank row. I can do this with the macro below. My question is that I only want the merge on each blank row to merge A:H. Example would be insert row 9 and merge A9:H9. Insert row 11 and merge A11:H11. and so on till the end.
Code: Sub insertrow() Application.ScreenUpdating = False Rows("9").Select Do While Not IsEmpty(ActiveCell) ActiveCell.EntireRow.Insert ActiveCell.EntireRow.Merge ActiveCell.Offset(2, 0).Select Loop Application.ScreenUpdating = True End Sub
I need to insert blank row/s between the missing dates. Let me explain in detail,
I have a start date in Cell B1 and end date in Cell D1. Need a macro to verify the date range in Col B with these start & end dates and insert blank row for missing date corresponding to employee names in Col A. This should be repeat till last used row of the sheet.
I am having trouble trying to figure out how to insert blank cells:
I need to insert cells, in columns B through H, equal to the number of returned IDs in column B.
Please take a look at the spreadsheet I attached.
Here is the code I am using to separate the IDs in column B so that I get one ID in each A cell. When I do this it separates them great, but then I have to manually go in and insert cells down so that the rest of the rows match up with the right ID.
Sub Macro1() Dim fromCol As String Dim toCol As String Dim fromRow As String Dim toRow As String