Lock Cell From Moving When Adding/Deleting Rows Or Columns
Jun 16, 2008Will excel allow text to be permanently be positioned in a specific cell even if rows or columns are added?
View 6 RepliesWill excel allow text to be permanently be positioned in a specific cell even if rows or columns are added?
View 6 RepliesI have an excel work book with 6 tabs. I would like to have Excel move an entire row from one tab to another tab (removing the row and inserting it in the other tab). I.e. Example I have a tab with items that are marked as "Open Actions" so if I were to change the drop down to close. Excel would move that entire row of actions to the tab with the "closed actions" and insert into the next available row. Now if someone were to come back at a later date say no it should be reopened than I would change the drop down to open and excel would move that row back to the open actions tab into next available row. I tried a PIVOT table and no good I played with few macro and not.
View 5 Replies View RelatedI'm using Conditional Formatting for an entire column to check the value of each cell and compare it to the value of a cell in the same row but a different column. (Cell Value equals =$D2) It works great until I insert or delete a cell in the formatted column. The reference does not change as one would expect. I've played around with formulae such as =$D2<>$P2 but the reference only changes for the P2, not the D2. I've also tried using =CELL("contents", ADDRESS(Row(),4)) but this causes excel to complain.
View 3 Replies View RelatedI have created a spreadsheet with 4820 rows of data (4821 for computational purposes, the last row being blank) with 5 columns.
1. every third row is blank and it needs to be removed (3, 6, 9,...4818, 4821). Once this is accomplished,
2. I need to move the data that is now found in the even rows, column E moved to the above, current odd row, column F. (ie. E2 to F1, E4 to F3, E6 to F5,...E4808 to F4807...,E4820 to F4819 (however it won't go this high). then
3. I need to delete all the current even rows, as the data I need will be in the odd rows.
This is similar to a previous post, in July, which was masterfully solved. I have tried to adapt the previous script, without success. Therefore,
I have copied data from a screen and entered it into Excel 2007, which is attached as 'snohomish sample.xlsx The data starts out (sheet 1) in 8 columns (A-H), and only in the odd rows (1, 3, 5, ...) What I wish to do is the following:
Move 'sheet 1 column B' to 'sheet 2 column A'. This is a date which needs to be in mm/dd/yyyy form.
Move the last 14 digits in 'sheet 1 column F' to 'sheet 2 column B'. This needs to be text so that I don't loose any of the zeros.
Move 'sheet 1 column E' to 'sheet 2 column C'.
Leave 'sheet 2 column D' blank as I will be entering a currency amount after running the module.
Move 'sheet 1 column A' to 'sheet 2 column E'. This also needs to be text as I can't loose any zeros or have it in scientific format.
The rest of the data on sheet 1 is not needed on sheet 2.
I will be entering data in 'sheet 2 columns F-K' after running the module.
I am attaching 'snohomish results.xlsx' which shows what I hope the results to look like (note the sample results are on sheet 1 of a different file).
Using VBA... I have Column N (eFIUnitRebate) which I want to swap with Column M (FFUnitPcnt)
Now with Column M as eFIUnitRebate and N as FFUnitPcnt I want to create an extra column (adjUnitCost) where Column N is and push FFUnitPcnt to become column O, etc.
Here is how the whole process should work:
Swap M and N
Insert new Column in N
Insert new Column in P
Insert new Column in Q
Insert new column in R
There is more information on the sheet after these columns so for all column inserts it needs to push whatever was there over.
So the layout is as follows:
J
K
L
M
N
O
P
Q
R
Units
UnitCost
UnitRebate
[Code] .....
These columns are thousands long, so I would like the formulas for them to be applied to the whole column as well.
I have a spreadsheet with 20 or so columns but that number can change at any time. I need my code to by dynamic so if a column is deleted (or added) my code will still work.
Each column has a name in row 2 and I'm trying to use that in order to make everything dynamic. For example, my code counts the number of blue cells in colums D4:G68, but now if someone adds a column before column D, everything gets messed up and it will still count the cells in D4:G68 but I want to use E4:H64 now. Does that make sense? I have made code that searches the column names and returns the column number to correspond to the name. How would I change this?
Range ("C8") = "= CountBlue(E4:G68)"
the code doesn't look exactly like this, I believe it is actually in R1C1 format
I have a spreadsheet with multiple similar entries I would like to add up. What would work well for me is to be able to input a column like a and a target column like e.
So in this case it would search throughout column a and wherever it finds a duplicate entry add column e and then delete one of the rows. I could then run it again under different column criteria if needed.
So if I had the below sheet:
I could search by column a and add up column h to read like this:
I have a large spreedsheet like below and want to move "the "anytown, US" to the right of "1 Main Street" and delete blank rows. [I know a few ways to do the latter]
John Smith1 Main StreetAnytown, USJohn Smith1 Main StreetAnytown, US
I am using several formulas to conditionally format and fill in rows from column A to column BS. These are the formulas and application areas:
=$BS4<>"" Applied to =$A$3:BS$350
=$G3<>"" Applied to =$A$3:BS$350
=OR($J3="Regional Manager",$J3="Assistant Manager",$J3="Manager") Applied to =$A$3:BS$350
=OR($J3="Recruiting Manager",$J3="Owner",$J3="District Manager",$J3="Office Manager") Applied to =$A$3:BS$350
If I do not add or delete any rows, everything works just fine. The problem I am running into is that this list is constantly updated and rows are being added and deleted. When I do this, it duplicates my rules and changes my applied to ranges. Here are some examples of the changes:
=$N$3:$BS$3
=$A$3:$M$63
=$N$4:$BS$64
This creates much excess work, when I have to go back and change everything back to the way it should be. how I can either modify my formulas or application areas to correct this situation?
I currently have this formula to deal with this:
=SUM(J5:INDEX(J:J,ROW()-1))
However, whenever I delete the top row...I get a reference error and have to re-adjust...
I have a Productivity Report that contains very basic formulas that provide totals for 4 columns (B6:E6) and an average for one column (F). I have included two command buttons, one to add a new row and the other to delete a row.
I need to be able to add or delete rows depending on how many employees' productivity I will be tracking on any given week; each row represents a separate employee. I need the following functionality out of my form:
1) formula in column F needs to copy and paste with each new line
2) when a new line is copied and pasted I need the contents to be cleared
3) I need the user to be blocked from deleting the first row (3 on this form) in the table
The code I'm using for my "Add" button is:
[Code].....
The code I'm using for my "Delete" button is:
[Code] .....
The buttons add and delete rows as I'd like them to but content is not clearing, with each row added the contents provide a sub total. I've tried various lines of code (some more complicated and some less) before I recorded my own macro (see above).
Attached File : Productivity Report (HH).xlsm
I currently have this formula to deal with this:
=SUM(J5:INDEX(J:J,ROW()-1))
However, whenever I delete the top row...I get a reference error and have to re-adjust...
ColumnA in my data base contains dates. How can I delete the entire row if the date is before today's date and add a new date at the end of the range to replace the deleted row.
removing duplicate rows and move other data frm rows to columns.xlsx.
I am attaching a sample excel sheet showing what I need to do.In the first tab, I have a list that includes duplicate rows (first column only). I want to remove those duplicate rows but I don't want to lose the data in the following columns which can be unique or duplicates as well.
see the desired result tab in the sheet to get an idea of what I am looking for as the end result.
Keep in mind that the actual source file I am working with could have up to 50000 row, and the expected results could be around 2000 rows. So nothing can be done manually.
I currently have the following Macro for one of my many checkboxes in 2007 Excel:
[Code] .....
It works perfectly until additional rows are added/deleted before the indicated rows in the code (It changes the number sequence in the workbook). The number sequence stays the same in the code which means I am now hiding rows either before (delete rows) or after (insert rows) the intended rows I want to be hidden. Is there a way to change the above code to remain with the assigned rows regardless of the adding/deleting of rows before it?
I have dedicated rows and column units.I do not want these to be changed from there current setting.Can just rows and columns be locked and password protected? If yes,where and how do i process this feature?
Excel 2010
I am trying to move row data into column data. Here is visually what I need.
Before:
After (one row of data only):
We are trying to import data into our accounting software but we can't until we get it into the right format.
I have a massive data file with thousands of lines of data. Each line is a pair, for example
View 6 Replies View RelatedI am running through some old accounting documents in excel 2003 (originally from SAP), that contain information in row form that I would like in Column form. Column E indicates to me whether this was an invoiced amount or payment amount or "other." I have limited VBA exposure, but am fairly proficient at what I do know. This is just too difficult for me!
Where the "Assignment" #'s are equal, I need the script/macro to move "up" YP's, YQ's,
See Original Layout.jpg
Then What I'd Like.jpg
Then End Result
I have the following spreadsheet with 4 columns of data:
1000001245aMr Fred Blogs
1000001270a1 Blog Street
1000001270bNorwich
1000001270cNorfolk
1000001270eNRx x99
1000001270gThe Manager
1000001270k01603 555 555
1000001270l01603 555 555
1000001270qManager
1000001270xN
1000001270yN
1000002245aMrs Fredilina blogs
1000002270a10 Blog Street
1000002270bNorwich
etc etc for about 36,000 rows.
What I need is for each unigue reference ID (column A),
I need all corresponding data moved up into a single row in serperate columns, something like this:
1000001 |245|a|Mr Fred Blogs| 270|a| 1 Blog Street|270|b| Norwich | 270|b|Norfolk |etc
1000002 |245 |a |Mrs Fredina Blogs |270|a|10 Blog Street |270|b|Norwich| etc
Each entry doesn't nessesarily have the same number of rows.
I would class myself as a beginner VBA bod, but the solution to this one is illuding me a present.
I have address data all in column A (each paret of the address is on a separate row) which I need to move to separate columns on one row for each address:
ie:
Mr Bloggs (row 1)
123 The Avenue (row2)
The town (row 3)
The postcode (row 4)
Mrs Smith (row 6)
456 The street (row7)
The postcode (row 8)
needs to be: (I have used || to indicate different columns)
Mr Bloggs || 123 The avenue || The town || The postcode
Mrs Smith || 456..... || .......
The problem you see from the above is that they are not always consistent ie. the postcode (zip) isn't always 3 rows below the name for example. Also although generally there is a blank row between each record (this may sometimes be 2) and equally there may also be times when there is a blank line in the address.
Any ideas on how to do this.... I have 1000's of records and really can't afford to go through each one making it consistent before moving it to columns?
I have following data on spreadsheet, which I need to import into other place but I would need to reorganise rows and columns first.
Product1-Sep2-Sep3-Sep4-Sep
SKU1112345
SKU22212131415
SKU3339876
SKU4444444
Basically I would like to have this data in 3 columns like this:
DateSKUOrders
1-SepSKU1112
1-SepSKU22212
1-SepSKU3339
1-SepSKU4444
2-SepSKU1113
2-SepSKU22213
2-SepSKU3338
2-SepSKU4444
3-SepSKU1114
3-SepSKU22214
3-SepSKU3337
3-SepSKU4444
4-SepSKU1115
4-SepSKU22215
4-SepSKU3336
4-SepSKU4444
I tried transpose etc. and not able to figure it out. Is this something that can only be accomplished with VBA?
I am having difficulty expressing a formula so that if a cell is greater than zero, it adds the value of that cell to a String figure. I have got as far as the following, the 'problem' area is in red.
Sub Share_Sales3()
Dim Prompt As String
Dim Caption As String
[Code].....
to prepare an excel spreadsheet for a mailmerge but as all of the info for 1 recipient needs to be in columns instead of rows. I need to convert 2 columns' data into columns but only when there are duplicate invoices, see below;
View 9 Replies View Relatedimport it into to Stata to do statistical analysis. I always receive spreadsheets like this:
country
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
[code].....
and I have to manually reorganize it like this to import into Stata:
country
year
value
Benin
1991
20
Benin
1992
254
[code].....
Is there way I can quickly design a macro to do this? The problem is that I generally have a list of about 60 countries, and years from 1991-2011. So, it's really time consuming copying the column of data corresponding to the year, pasting below, repasting the list of countries and the years...then again..then again...then again...I'm using Excel 2010.
I know it's possible to lock objects (textboxes), via their properties. ( ie: to move or not with cells),
However, I'm trying to lock down a textbox so that when I scroll the main window, the entire page scrolls except the textbox, which remains in it's position.
A quick solution would be to freeze/split this area... but part of my work area is already utilizing a frozen partition.
I don't believe there is a way to freeze multiple areas.. or is there?
how to prevent a textbox from moving?
I'm sure this is simple code, but...
I have a data table with over 20,000 rows that refreshes each day. I need to run a bit of code when it refreshes that says if the value in column R is 2, then delete that row.
I need to delete rows that are blank, 0, or contain errors (#REF, #N/A, etc). My problem is that once in a while, an error will show up in a singe cell of a row that I need to keep so a simple deletion of only errors/blanks/0 will not work for me.
The two cells I need to check for errors, blanks, and 0's are D and E. There can be an #N/A in col D and a 0 in col E or both D and E can have errors. Blanks will occur in all cells of the row.
I have tried to use the code below but it doesn't do anything, but it also doesn't give me an error.
Code:
Sub DeleteAll()
Windows("Template.xls").Activate
Dim r As Long
For r = 2 To 36500
If Range("D" & r).Value = "#N/A" And Range("E" & r).Value = "#N/A" Then
Range("D" & r).EntireRow.Delete = True
[code].....
I have assgined a group of object to run Macro's. Each object has it's own Macro. The part I am missing is that when I move through the Excel data the object should move too. The group of Object should be visible even if I work in row 1 or row 100000?
View 6 Replies View Related