Hit Tab Button To Insert New Line And Preserve Previous Lines Formulas

Feb 23, 2014

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‎

View 5 Replies


Insert 2 Lines Under Line 6 In The Active Sheet

Aug 27, 2008

I have to do a large amount of routine work with a large number of sheets. I have tried to record some macros to do the job.

First of all I would like to insert 2 lines under line 6 in the active sheet.

I then need to drag the formulas found in line 6 down over the two new lines.

Thirdly i would like to change the text string "xxx" in the formulas found in line 7 to "yyy"

View 9 Replies View Related

Insert Rows (and Copy Formulas) Using Command Button?

Feb 5, 2014

I have a simple command button in my worksheet that will insert a blank row and copy formatting, but not the formulas. How do I adjust the code so that the formulas are copied to the new blank row? This is currently what I have:

Private Sub CommandButton2_Click()
Sheets("WAWF Track").Range("A9").Select
ActiveCell.EntireRow.Insert Shift:=x1Down
End Sub

View 5 Replies View Related

Editing Existing Macro To Preserve Option Button Settings Upon Activating Worksheet With OBs

Sep 19, 2013

I have been using this code and just noticed that it resets all of my options buttons to false when I exit and then re-enter (activate) the sheet with the option buttons.

I see where this is going on, but don't know how to correct it. I only want the option buttons changed to false if

The Sol named range is something other than "Primary Vendor". It seems to call the macro ClearOB whenener the sheet is activated.

Private Sub Worksheet_Activate()
If Range("Sol").Value = "Primary Vendor" Then
For Each OB In ActiveSheet.OptionButtons
OB.Enabled = True
Next OB
ActiveSheet.ScrollArea = "A1:K58"

[Code] .......

View 1 Replies View Related

Excel 2010 :: Insert A Line Every 4th Line?

Nov 29, 2013

I have a spread sheet with product codes on and 5 different prices types but they have only pulled through 4 times so need to insert a 5th line for each product code

View 2 Replies View Related

Identify And Insert Line In Last Blank Line

Aug 22, 2012

Creating a macro that will identify the last blank line in column J and insert a line in it? The macro will need to look from the "bottom" as there is blanks cells above the last line.

View 5 Replies View Related

Delete 1 Line After Each 65 Lines

Jan 13, 2010

I have 2 columns in Excel wich havn't the same amount of lines.

One colom is 65.000 lines and the other one is 64.000

I am looking for a option to delete 1 line after each 65 lines.

Is this possible?

View 6 Replies View Related

Line Graph With 2 Lines Per Person?

Sep 15, 2013

I need to create a line graph that has 2 lines for each person, one with the amount, one with the points. The X-Axis is by Weeks going up. How can I do this without making a separate series for each? I've attached an example.


View 1 Replies View Related

VBA Error Goto Previous Line / Statement Not Resume Next

Aug 10, 2012

I have some code below. I have error handling in place for when it tries to open a specific file. If it isn't there then user has option to continue and ignore this file, or browse and select a new one.

The problem is, when the user wants to ignore the file, the "Resume Next" continues to run the VBA assuming the file was ok i.e. the code after the line to open the file. What I would like is for it to skip the succeeding code and go to look for the next file.

Below is the VBA:

For i = 0 To 2 Step 1

'add in error handling for if the file is missing
On Error GoTo MissingFile
Workbooks.Open Filename:="\hbeu.adroot.hsbcdfsrootgb002hfcfinance01fnce" & qfolder & "Data" & qfile(i), UpdateLinks:=False, ReadOnly:=True

[Code] .........

Missing File:

qMissingPrompt = "There was an error opening data file. Click OK to browse or Cancel to ignore and move to next file"
qAns = MsgBox(qMissingPrompt, vbOKCancel)
'click cancel - ignore error and move onto the next file
If qAns = vbCancel Then

[Code] .......

So, where it says Resume Next, currently it will start running the following (after On Error Goto 0)

Set datawb = ActiveWorkbook

Do Until ActiveCell.Value = ""

What I would like it to do is go back to is to go to the next i

For i = 0 To 2 Step 1

Or even to go to the 'Next' statement at the end so that it moves onto the Next i and tries to open the next file.

View 2 Replies View Related

Multiple Lines To One Line (Rows To Columns)

Aug 12, 2014

I have is a list of the over 500 people with one line per college degree. Some have up to 4 or 5 degrees. Each have SSN as unique identifier.

I need to consolidate into one like per person with multiple columns one for each degree.

See attached : Test Degrees.xlsx

View 6 Replies View Related

Place 1 Line Of VBA Code Into Mutiple Lines

Jun 11, 2009

I stumbled on this and wasn't sure why the code was placed on different lines and how the highlighted sections in red affect the basic round function.

ColorCompare = Round( _
(111111 + Blue + Red + Green) / (Green + LenPaint) _
, 0 _

View 3 Replies View Related

Transfer Single Line With Sum Of Multiple Lines

Oct 16, 2007

I import data into an excel spreadsheet where a unique job number may have multiple costs against it. These import as separate lines, repeating the job number.

The data imports on a sheet called 'DataImport'. From that sheet I transfer some of the imported fields onto another sheet.

What I need to be able to do is transfer the job number and a sum of the costs onto the other sheet.

The data is run regularly and I delete all the fields on the DataImport sheet in the macro each time the import is run.

View 9 Replies View Related

Line Up 2 Sets Of Information And Delete Unneeded Lines?

May 15, 2014

I have 2 lists of codes with values tied to them, columns A & B, and columns C & D. Column A is a list of the codes in use, and column C is every code possible, I need to line up the codes and shorten column C to match column A, while retaining the value that is tied to each code so that I can compare Columns B & D easily.

View 2 Replies View Related

Adding Grid Lines And Line Numbers In The Report?

Mar 4, 2014

See the code below. It works fine but in the report that gets printed off, it doesn't display grid lines and line numbers .

[Code] .........

View 3 Replies View Related

Excel 2010 :: Line Graph Isn't Charting Lines?

Feb 23, 2012

I have been trying to chart temperature differences over 10 day's time for six cities using a line graph. For some reason, the lines are all clustered at the bottom of my graph, with values of 0. My spreadsheet is accurate, without any blank cells. I'm using Excel 2010.

View 1 Replies View Related

Inserting 1 Line In Sheet1 To Enter 5 Lines In Sheet2

Jul 23, 2006

One has around 129 lines for the first years 2006 in sheet1.
The other links to the first 129 rows. Then I've linked the top 129 in sheet2 130 down for 2007 and so on for 5 years.

How would I add a line in Sheet1 then would insert 5 lines in sheet2 keeping the same order.


Name Rev Year
John 120 2006 Row 5
Jack 150 2006 Row 6

Sheet2 (linked)
Name Rev Year
John 120 2006 Row 5
Jack 150 2006 Row 6
John 130 2007 Row 134
Jack 160 2007 Row 135
John 140 2008 Row 263
Jack 160 2008 Row 264
John 150 2009 Row 392
Jack 170 2009 Row 393
John 155 2010 Row 521
Jack 180 2010 Row 522

The Rev changes by formulas in Sheet 1

View 9 Replies View Related

How To Convert Selected Multiple Lines Of VBA Code Into Comment Line

Jan 29, 2014

Adding ' in the beginning of a line converts the rest into comment line. I wonder if there is an easy way to convert a huge area into comment line to try something on code. I couldn't find such an option in the menu.

View 2 Replies View Related

Broken Line Chart Code Turning Lines Black

May 24, 2007

creating breaks in the line this script now simply turns the line black.

View 9 Replies View Related

Dynamic Hyperlink Next / Previous Button?

Feb 18, 2012

Im creating a template for a number of sheets and I want the hyperlink for my previous/next buttons (to move forward and back through sheets) to change based on cell values.

All my sheets are named as numbers ie '1','2','3' and so on

The name (and therefore number) of the sheet is held in cell E22 on each sheet.

The 'previous' button needs to therefore hyperlink to cell A1 on sheet (E22-1) and the 'Next' button to cell A1 on sheet (E22+1)

The 'buttons' I have though are arrows from Excels shapes and I dont know how to add code to them though to start the hyperlink.

Also if i wanted to reference sheet E22-1 etc in a HYPERLINK() function what is the syntax?

View 5 Replies View Related

Back Button Go Previous Sheet

Nov 14, 2008

I am working within a workbook with many worksheets and I want the ability to go back to the previous sheet I was on (example - I am on sheet 23, go to sheet 16, I want to be able to have a button or link that takes me back to sheet 23)

View 9 Replies View Related

Insert Next Row Based On Previous Cell Value

Jul 15, 2004

My current code works, but there's got to be a shorter version to insert rows based on a cell value. Currently my code works on a series of If statements. If the value in the current cell is "2" then goto the next row and insert one line. If the value is "3" then go to the next row, insert, next row insert etc. I'm currently written up to a value of 10, but the coding is getting longer and longer. Anybody got a shorter loop that I could use.

View 9 Replies View Related

Excel 2007 :: Cmd Next / Previous Button On Userform?

May 20, 2014

I ma using exel 2007 and I tryed to use this codes,I need faster to finish this project

Soo I have done only 2 buttons OK and Close the tab works like this I CLICK "Kerko" and then I write the name that I want to search in my Phonelist and when I click Ok it shows me his surname his telephone name and his City prephix

But the next and previous button I cant make them work,soo when I have to click next the name down the name that I first wroted will apear with his surname telepphone name and city prphix,and when I click prevoious will happend the same think but will not apear the next persone but the previous.

View 1 Replies View Related

VBA For Insert Previous Month In Sheet Name On Open

Feb 28, 2007

I'd like to make a template so that when it is opened the previous month name is inserted in the sheet name. The reason I want to use previous month is that normally this report is created in the month following the month being reported. So it is opened, months are updated, then the user saves as xls. Ideally I guess sheet would not have the month on the template.

The name of the sheets are shortened months like "Dec Results Bob" and there are 8 of these.

I can tell it might start:

Private Sub Workbook_Open() (or would .xlt be the same?)

but that's about it. I made a macro of renaming sheet but that didn't really tell me if I could insert the Month there.

View 9 Replies View Related

Add New Rows(preserving The Formats And Formulas Of Previous Ones) Dinammycally And Automated

Apr 24, 2006

I have a very large table with 7000 rows and each time I open the file it takes excel about 1 minute to open it.Initially all cells in the rows are empty. Each row in the table has the same formats and formulas(eg. in J106 I have =IF(C106=1,1,"") and in J107 I have =IF(C107=1,1,"")).So the excel allocates all the memory and does the formatting and computations beforehand. How can I add new rows(preserving the formats and formulas of previous ones) dinammycally and automated? An example will be if I start enter data in a row add another row at the end of the table or a button that when I press it adds lets say 100 new rows in the table. Below is the table, the rows in the table to which I add data start form C15 to C7014.

View 3 Replies View Related

VBA To Insert Lines When Cell Value Changes

Feb 12, 2014

I have this code:

[Code] .....

The first change in column K it finds perfectly but then it enters a lot of blank rows and does not put blank rows at the rest of changes in column K.

View 2 Replies View Related

Deleting Lines - Keeping Formulas Fixed

Sep 6, 2007

With a macro i want to delete some lines in sheet1. In sheet2 however i have formulas that point on sheet1 .. like this


Now when i delete line 2, the result would look like this

Is there a way to make these formulas pointing at the same cells after line two is deleted? And i do not mean a work around, with different formulas. I just want the Formulas in sheet2 to remain unchanged, regardless of what happens in sheet1...

View 9 Replies View Related

Select Series (lines) In Line Graph By Adding Userform With Checkboxes On A Chart

Apr 15, 2014

I want to add a user-form on a chart, which will have check-boxes that will allow me to select series(lines) that I want see and compare in a chart. Currently my line chart has 24 series (Lines) which makes the chart very difficult to view and looks very busy. How do I add list of check-boxes that will allow me to select one or multiple lines that I want to see at a time?

View 2 Replies View Related

Excel 2013 :: Merging Selected Lines In Worksheet To One Line - Removing Dupes?

Aug 12, 2014

I merged about 15 adresslists from media contacts to one excel list. Each list had a name i.e. music, health, theater, etc. and the same logic in colums. I added a few columns and have 1 large list now.

As some journalists write about music & health & theater, architecture, etc. they are listed up to 10 times in the new list now. But the "genres" from the original list i.e. music, health, theater, etc. are in different columns. Some of the lines have empty fields (i.e. no address or mail)

All I want to do is have one line with all the information of all 10 lines in it, merged, dupes removed:

company - firstname - lastname - Adress - Mail, etc. : genre: music - health - theater:

I atteched an example of the full list and the result i want

View 9 Replies View Related

Remove Vertical Lines When I Insert A Row

Feb 23, 2007

I have code that works well to insert a blank row. I need to remove all vertical lines each time it adds a row. You can see I commented out the line I tried.

Sub InsertRow()
Dim LstRw As Long, ChkRw As Long
LstRw = Cells(Rows.Count, "A").End(xlUp).Row
Application.ScreenUpdating = False

For ChkRw = LstRw To 6 Step -1
If Cells(ChkRw, "A") Cells(ChkRw - 1, "A") Then
'Selection.Borders(xlInsideVertical).LineStyle = xlNone
End If
Next ChkRw

Application.ScreenUpdating = True
End Sub

View 9 Replies View Related

Inserting Lines, Takes Neighboring Formats But Not Formulas

Nov 15, 2008

I have a spreadsheet that I have people fill in. A few columns have VLOOKUPS. I want to allow people to insert lines in this spreadsheet and have the formula automatically copy in the new line. It seems to already have that behavior for formatting and conditional formatting. Is there a way to also have that for formulas when inserting lines?

Name City Assigned Salesman
john Mountain View (formula using VLOOKUP)
cindy Palo Alto (formula using VLOOKUP)
ronnie sunnyvale (formula using VLOOKUP)

Insert line between john & cindy. Formula doesn't copy.

I ask them to copy the formula but they often forget. If I can make it a little more robust,

View 11 Replies View Related

Copyrights 2005-15 www.BigResource.com, All rights reserved