Adding Line Based On Value?
Mar 13, 2012
I would like to insert a line if a cell contains something. I get it to work in a macro with this:
Code:
Sub insert()
If ActiveCell.Value = "*" Then
ActiveCell.Offset(1).EntireRow.insert
End If
End Sub
But if i want it to do this in sheet change it doing nothing
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveCell.Value = "*" Then
ActiveCell.Offset(1).EntireRow.insert
End If
End Sub
View 6 Replies
ADVERTISEMENT
Jun 21, 2008
Currently I am using Excel 2000. I did a search and couldn't seem to find the answer I was looking for. Hopefully someone can help. It would be greatly appreciated since I have been trying to figure out how to do this for days.
I am trying to create a worksheet that will pull info from a row on one sheet to another sheet based on the name; then continue to list the info on each line afterward until there is no more of the that particular criteria. See below (this is just an example to simplify the data but would need the same process):
This would be the data on sheet 1:
Name Bonus Commision
Tom $45 $50
Mary $25 $75
Mary $30 $80
Tom $60 $50
Tom $90 $25
What I would like to do is have 2 more sheets. One would be Tom's sheet and the other would be Mary's sheet and it would look like this:
Tom's Sheet:
Tom $45 $50
Tom $60 $50
Tom $90 $25
Mary's Sheet:
Mary $25 $75
Mary $30 $80
I am not completely familiar with all of the functions in Excel and compared to you guys I am a complete novice.
Is this possible to do in Excel without using a macro?
View 9 Replies
View Related
Jan 20, 2014
I am trying to recreate the screen grab that I have copied and pasted in (purple bar chart). I am to create the bar chart, but I am unsure how to create the dotted line which is the national average.
View 3 Replies
View Related
Oct 4, 2009
I have some data in Cell A1 and B1, I want that data in combined in one cell but in diffetent lines.. For example if i have 123 in A1 and 456 in B1, I need it to show the result as below in C2
123
456
View 2 Replies
View Related
Mar 8, 2014
I use the Subtotal function to sum several columns during the subtotal function. I dont think I can run a subtotal doing the sums and counts. Is there any way to add the number 0f rows in each subtotal? Count? I'm not sure how to go to each blank row (subtotal line) and count/add the number 0f rows in that subtotal?
View 4 Replies
View Related
Dec 14, 2009
I need to add extra text line in textbox by Toggle Button or checkbox. The problem my extra line every time I select it makes extra lines
View 5 Replies
View Related
Jul 6, 2009
I need to be able to paste information into excel and then get excel to read the characters to 50 and then move the other info to another line and do the same command again until it has read all the data and put it in lines of 50.
View 9 Replies
View Related
Jul 13, 2007
The attached file receives information from another program in cells A2:D2. It then carries out a copy/pastespecial, and then does a copy insert. The script is supposed to update when new data enters the cell, however it keep adding an additional null line. Does anyone know why this is or how to fix it?
View 2 Replies
View Related
Nov 4, 2009
I'm just trying to add the "=" operator to the below "" operators, as this line of code presently doesn't account for any numeric matches, of which I have plenty, and DO need to account for! Gosh, might someone here know how to integrate such a thing into this code?
If Range("I3") Temp Then Range("I1") = Temp
View 9 Replies
View Related
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
Jul 13, 2009
I am looking for a time saver macro,pretty easy to make i guess,as the theory is not difficult...but i am too newbie to make it. So i have an xls that has like 20k lines on Column A!And i have to seperate the numbers. I count the first 4 digits and I have to do it by adding a cell between them.
Example :
27289802
27289902
27289915
27289915
(add a null line)
27290202
27290302
27290316..................
View 2 Replies
View Related
Oct 11, 2011
I want to a horizontal line in a chart. There are only two figures with me. One I want to display as a column chart. The other as a horizontal line chart. (I can use both excel 2003 or 2010, whichever is suitable)
View 2 Replies
View Related
Oct 15, 2009
I am using the following macro to set print area which I found on the net. I am trying to modify it as I would also like to place a border line on the bottom row but cant find anything to assist me despite searching through several threads.
Dim myrange As String
With ActiveSheet.Range("A:A")
myrange = .Find(What:="*", After:=.Range("A1"), LookIn:=xlValues, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Address
End With
ActiveSheet.PageSetup.PrintArea = "$K$1:" & myrange
End Sub
View 9 Replies
View Related
Feb 23, 2008
I am currently working on an excel file in which we track progress through the use of an autoshape line. Everytime the progress needs to be changed the line must manually be resized. I am using buttons with macros and trying to add a certain length to the line. So far I have been using the following
Sub line()
ActiveSheet.Shapes("AutoShape 80").Select
Selection.ShapeRange.IncrementLeft 28.5
End Sub
This code resizes the line by adding a percentage of the line length to the line. I want to be able to add the same length everytime.
View 5 Replies
View Related
Feb 6, 2013
I have a 97-2003 spreadsheet with approximately 22,000 lines of seperate companies. I need to know how to insert a blank line between the company names. I have been using the "Right Click - Insert" method but soon realized there must be 2000 different companies. The Company Name column is A.
View 7 Replies
View Related
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
Jul 14, 2012
I have created a population pyramid and want to add another chart on the secondary axis which I can do. The part which I seem not to be able to complete is getting the line chart secondary axis to read from the primary y axis. It seems to add a new axis, even when I delete this the line chart does not read correctly.
View 1 Replies
View Related
Oct 26, 2012
I have a question about creating a line graph, here's the scenario:
Once per week I update our inventory quantity in cells B1, B2, B3. I'd like to show these quantities on a graph which compares the quantity with the date. When the quantity gets updated it would automatically add week 2, when the quantity gets updated again it would again expand the graph and add week 3. Is this even possible?
Week 1
A B
Widget 2
Hammer 1
Saw 6
Week 2
A B
Widget 4
Hammer 1
Saw 6
View 2 Replies
View Related
Jun 17, 2008
My company has an excel file that has our new customer's information (colum A & B are first & last name;Column C is customer email; Colum D is cutomer phone, ect...)
once that information has been entered we have another excel file that will load all of a customer's information, and then be pasted into a welcome letter into MS Word for their confirmation & emailed to them
The problem I'm running into, Is that I do not know how to populate my nex excel sheet with the info I want only from a specific line.
I would like to enter a line / row number (for example '6') and than have excel go to that file & copy/paste the name, phone, email, company name, ect. into my new excel sheet
I have one that works already, but the previous owner PW protected it & hid his formulas/macros, so I'm in a dead end now...
View 9 Replies
View Related
Nov 25, 2013
I have a row which contains a date header.
Under this there are multiple lines of activities each with a different end date and empty cells under the calendar headers so that people can enter how long they have worked against that project.
What I want to do is to compile a VBA coded which will cycle each line and at the intersection of where the end date and header match to colour that cell in a defined colour.
An example below:
Date
Colour
01 Jan
02 Jan
--->
[Code]......
View 8 Replies
View Related
Jul 2, 2007
I manually enter data into inserted comments in a worksheet. Is it possible to run a macro that formats comments to align based on spaces? Ie
Entering "City","State" and "Amount" on row 1 in a comment and entering "Denver", "Colorado" and "5" in the second row would produce those words to align at a predetermined spacing (ie after every space the next word would start 10 characters over)
-----------------
City State Amount
Denver Colorado 5
View 4 Replies
View Related
Nov 21, 2007
I want to show 8 members of staff's names, with their sales closing percentages. I want then to produce a chart showing their percentages as a column with a line showing 16% going across the chart showing who is above and who is below the target.
Ideally i would also like to change the colour of the columns or background of those below the line to show who is under target.
View 4 Replies
View Related
Dec 5, 2007
I have an excel spreadsheet which calculates the count and value of line items based on a report. I use the sumproduct function to calculate this as it involves multiple criteria. The formula is use is
SUMPRODUCT(('Report 50'!$C$2:$C$64992= Dashboard!$B172)*('Report 50'!$H$2:$H$64992=Dashboard!G$2)*(LEFT('Report 50'!$S$2:$S$64992,14)="credit transfe")*('Report 50'!$L$2:$L$64992=15))+SUMPRODUCT(('Report 50'!$C$2:$C$64992=Dashboard!$B172)*('Report 50'!$H$2:$H$64992=Dashboard!G$2)*(LEFT('Report 50'!$S$2:$S$64992,14)="credit transfe")*('Report 50'!$L$2:$L$64992=19))
I think the possible error is coming out of this criteria (LEFT('Report 50'!$S$2:$S$64992,14)="credit transfe")
Out of one particular field i am picking those line items in which the first 14 characters are "Credit Transfe", if i eliminate this criteria i dont get error.
But this is the main criteria for my calculation. Most of the time i dont get any error , but sometines i get the # Name Error? When i double click on the cell it goes to one column. I dont know what to do from there.
View 2 Replies
View Related
Feb 23, 2013
I have the data to import / read in a pdf, in a doc, or in an Excel worksheet whichever is easier to use. I need to import the data, parse it into the correct cells for that row and then repeat the import until the end of the file. Not all the cells are in each group of data to import, so those cells will be null for that row. Some of the data for one cell may be in up to 14 lines in the data file. I have be concatenating these data rows into one cell. There are 48,000 lines in the file to import or I would do this manually. I am assuming that doing this in VBA would be the most efficient method.
View 11 Replies
View Related
Nov 17, 2012
Our small family business has a mailing campaign that we track with excel. However, we're very concerned about users opening the macro-filled master spreadsheet. Instead, we'd like a macro to do everything for them.
When a letter comes back in the mail with a bad address, the user types the Street number and street name such as "1234 Main St" into $A2 of c:dropbox eturned.xlsm, presses the macro button, and it should do the following:
Opens and Searches "Sheet1", "column S", in the file c:dropboxmaster1.xlsm, and finds the LAST instance of the address typed.Selects that entire rowCopies the entire row.Pastes the contents into the row of the active cell in the destination spreadsheet, overwriting what was there before. Such as $2:$2 if the address was typed in $A2.In the master1.xlsm spreadsheet, sets the entire copied row color to "gray".closes master1.xlsm and saves changes.
The end result is that the user now has an identical row of information in their spreadsheet, and the master spreadsheet's row is colored gray indicating it has been completed.
Other notes:I'm open to more efficient steps than this if you have them.There are approx 5,000 records to search through in master1.xlsx at any given time.
View 5 Replies
View Related
Mar 30, 2013
I have about 180 workbooks which I need to compile into a Master Schedule.
All the tab 1's are different, these feed into tab 2, which the data has the same formatting throughout. The 2nd tab has the same data for A:F 1 but cells A:2 - F:2 down to row 9 are populated from tab 1, therefore different in each. I am trying to get a Master schedule that lifts the data in the fed cells into a line by line spreadsheet?
Is there a way I can get excel to look at a folder, then every workbook in it, the at the 2nd tab in every workbook, then list the cells as described above? I am not after a consolidation of this data, but a full list?
View 1 Replies
View Related
Mar 6, 2013
I am doing a financial analysis for a hospital. I want to know how to add something to a number based on conditions. Base pay is $300 for the first 10 patients. If more then ten patients >11-20 add 40 dollars per visit if greater than >21 add 50 dollars per patient
View 3 Replies
View Related
Jul 1, 2014
I want the numbers to increase based on the labels from a list, such as the first john chosen will get a 1 on the first cell on sheet 2, if john is chosen again the 2nd john will get a 2 on the next cell on sheet 2 and so on for the other names.
I tried to use IF(COUNTIF(D:D,D2)=1,LARGE(IF(D:D=D2,E:E)+1),1) but it didn't work out.
View 3 Replies
View Related
Sep 30, 2009
column A = Date : 01/02, 07/02, 14/02, 21/02, 28/02 (x-axis : shows when the table is updated)
column B = project: x, x, x, x, ,x (name of the project and trend line)
column C = Delivery Date : 01/05/2009, 08/05/2009, 20/05/2009, 30/05/2009, 28/02/2009 (plotted on the graph)
column D = Status : Green, Amber, Red, Green, Blue (status of the project. the points should be the same colour as is described in the table)
column E = Comments: original, delay, supply, out of money, on track, delivered-wow! (these comments will pop up if the user holds the cursor over a point)
NB Y-axis scale : 01/01/2009 to 31/12/2009 with increments of 14 days. this will be the same scale used for all projects.
Date Project Delivery Date Status Comments
01/02 x 01/05/2009 Green original date
07/02 x 08/05/2009 Amber delay supply
14/02 x 20/05/2009 Red out of money
21/02 x 30/05/2009 Green on track
28/02 x 28/02/2009 Blue delivered-wow
So id like the macro to draw the line for project x based on the 'delivery date'. The points should be coloured according to the 'status' column and when you hover the mouse over the point the data lable will show up taking info from the 'comments' column.
Would it be possible to create a macro that will be able to generate this graph automatically. I have a few projects id like to do the same thing for.
View 14 Replies
View Related
Feb 16, 2014
Actual
Result
london#123;new york#34;
london;
new york;
delhi#145;chennai#54;
delhi;
chennai;
hyderabad#748;
hyderabad;
[code]....
removing the # and numbers from text and add new line after ; symbol. So it would save me a lot of time in preparing status.
View 9 Replies
View Related