Free Microsoft Excel 2013 Quick Reference

tangent line

i have derived graph in microsoft excel sheet.i want to draw the
tangent line for that graph.but i do not know equation for the graph.
in x and y axis i have some values.i want particular point of xaxis to
draw the tangent line for the graph that would be meet the particular
point of the curve from that point i want to find out corresponding y
value for the graph. please any body know about tangent line for graph
help me.

Post your answer or comment

comments powered by Disqus
I would like to create a tangent line at a specific point on an exponential
curve and calculate the slope, as in the way one might calculate
instantaneous velocity on a position vs time graph. I can't seem to do this
using the trendline feature. Can some wise person out there help? Thanks for
your time.

I need to draw a line tangent to a curve that I plotted on a chart in Excel. Thus far I cannot find a way to do this. Is it even possible to plot a tangent line in Excel? Thanks for the help.


I want to know if I can make a tangent line from a graph made by 8 xy koordinater, it may be a bit hard to understand, but what I mean is that I have an x value with a corresponding y value, then I make excel make a graph from those values, afterwhich I want it to make a tangent anywhere on the graph.

Any help would be appreciated .

I have a list of 2-D coordinates
I made a curve by this coordinates
Now i need to make a tangent from a point of the beginning and calculate coordinates of contact my curve and tangent line
I add simple pic, my tangent should look like red line
Does it possible to make it in Excel without a function?
Plz help

I know that in Excel 2003 and earlier you can move a point on the chart, making it easy to move a line to where ever you want and get the slope from that. In 2007 they removed this feature, and I can not find another method at all. Any is appreciated, thanks.

I have only just began to use VBA in excel, so I hope you will forgive me if this is a foolish question.

I am trying to build an application to use in surveying. The spreadsheet calculates the beginning point of a curve along a tangent line, then calculates points every X meters along the curve untill it reaches a point at the end of the curve, less than x meters from the end of the curve.

I have been trying to write a looping VBA routing to calculate each point along the curve, and then open a cell beneath the current cell into which to place the next point, compare the point to the current one, and if it is less than the end point of the curve to go ahead with the next point.

This all sounds very confusing to type out, and my attempts have all landed flat on their face. basically my question is is there a way to write a code that will say:

    pointvalue=("last cell with a number in it") 
    If ("last cell with a value in it") = d4 Then endsub 
Else pointvalue=("Last cell with a number in it")+increase 
    If pointvalue < d4 Then ("Next cell down") = pointvalue 
ElseIf pointvalue>=d4 Then Next cell down = d4 
Loop Until pointvalue=d4 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

This may have already been covered elsewhere, and if it has, I would thank you to direct me to it, I have briefly searched your site and not found the solution I need.

Thank you so much,

Hi there...i'm David and i am new here...i don't even know if i put this thread on the right forum, but i hope that you could help me
Well, my problem is that i don't know how to make the envelope of a parabola (pedal curve of a parabola) with tangent lines, in excel obviously

Please, somebody help me...

I want to draw a tangent to the beginning of a line in my graph, and then get
the gradient of that tangent. Can Excel do that?

I'm doing a d vs t graph and I'm suppose to have 6 tangents at 6 different points to the curve. I figured out the line equations (of the tangents y=mx+b) but how would I go about adding them to the graph??

I am making a grade book and would like to find the sum of numbers from the top row only if they line-up with cells that have values in a row below:

R1 10 20 30 40 50 SUM R2 x x x 90 R3 x x 50
In this example, for R2 I want to add up the numbers in R1 only if there is an "x" the same column of R2. So the sum of R2=90 (10+30+50) and the sum of R3=50 (20+30).

(This is my first post, so I apologize for any faux pas)

Hello everybody!
Anyone can help me on finding where's the error in these lines?

oOLE = Workbook.ActiveSheet.OLEObjects.Add(ClassType:="Forms.CommandButton.1", Link:=False, DisplayAsIcon:=False, Left:=3,
Top:=20, Height:=9, Width:=40) 
oOLE.Interior.Color = vbRed 
Move And Size With cells 
oOLE.Placement = XlPlacement.xlMoveAndSize 
oOLE.Object.Caption = "Ins.riga" 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
Thank you very much,

Hello All,

I am very new to VBA and this forum so I apologize if my programming is not in line with standard programming techniques (aka inefficient). However, I would love your help. I am trying to increment the row on the Priority Status sheet after I have copied and pasted data (cells L47,M47,N47, R48, S48, T48) from another sheet (where the sheet is dynamically created so the name is unknown). The unknown sheet names are listed in the Priority Status column range (B5 to B30). I can't seem to figure out how to input another For loop to increment the line to paste the data.

Sub Test() 
    Dim c As Range 
    Dim rCell As Range 
    Dim i As Integer 
    Sheets("Priority Status").Select 
    Set c = Sheets("Priority Status").Range("B" & i) 
    For Each rCell In c.Cells 
        MsgBox ("The Project is: " & rCell) 
        Sheets("Priority Status").Select 
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
        :=False, Transpose:=False 
        Sheets("Priority Status").Select 
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
        :=False, Transpose:=False 
        Sheets("Priority Status").Select 
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
        :=False, Transpose:=False 
        Sheets("Priority Status").Select 
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
        :=False, Transpose:=False 
        Sheets("Priority Status").Select 
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
        :=False, Transpose:=False 
        Sheets("Priority Status").Select 
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
        :=False, Transpose:=False 
    Next rCell 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

I have a dropdown list and i want to compare the names on that list with some criterias.
The names that pass all criterias should go to a list.

So I imagined a button that copy the value of the cell and paste it in another cell, then it goes to the next line. So that if I use the copy button again, the first name won't be lost by the pasting of the second on the same cell. They will form a list.

Any ideas on how to do this?


Is it possible to include a variable in the line's name for GoTO statement?? Example:

    Dim a As String 
    Dim year As String 
    year = "2010" 
    If a= 0 Then Goto Lable & year 
End If 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
this is just simplified code of what I'm looking for. Year is consntatly changing, and there're lables for each year in the code.... I didn't want to write a long code like

ElseIf year="2010" Then Goto Lable2010 
ElseIf year="2009" Then Goto Lable2009 
End If 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


Welcome every one.
I have some data in CSV

I need to open this CSV file via VBS script and add some data in the end of first line and save this file. For example


should be:


Hot to do it with VBS ? (not VBA)

Best Regards

Hi all,

I'm trying to enter a vertical line to my chart to show today's date. I'm using Excel 2003 and have a product serial number with 4 date variable's on the vertical axis with time scale along the horizontal axis.

I'm sure this is probably a very simple solution, but I haven't got my head round it yet.

Many thanks for the help.


edit - I have an attachment but forgot to attach it after posting. To clarify, the date variable's show the product's serial number manufacture date, 2 inspection dates and a final life limit date. All I want to show is where today's date is displayed across all the serial numbers. Many thanks.

hi all,

i would like to plot the 1st dynamic line chart as shown in
but i never write any excel macro 2010 before, can any one show me one sample of this? thanks!


I have an excel file with data in the form:

world.This is an
example" within a cell.

I want to replace each
with a new line (Alt+enter equivalent when typing within a cell.)
When I tried to record, this is what I get...

Someone please help me.

     ' BR_Macro Macro
     ' Converts 
to new line character in excel ' ' Range("K6").Select ActiveCell.FormulaR1C1 = "Hi" & Chr(10) & "Hello" Range("K7").Select End Sub
If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

Thank you!


I have a small problem I hope some of you guys/girls migth help me with.

I have a continuously updating textfile. Each (lets say 1 second intervals) a new dataset (of 10 rows) is written into this file, at bottom.

I would like to read (at a click of a button) certain lines counted from bottom of this file, and put theese into a list on a worksheet. '

Lets say row 2 and 3 (from bottom of textfile), is put into A1 and B1.

So that next time I press the button, row 2 and 3 (from bottom of textfile), is put into A2 and B2.

Anyone to help a desperate girl with this? I'm quite lost...

I have been trying to add a Vertical line across my chart with no luck. This is the reference link I am using:

I am adding a sample excel document of my date and the chart I have so far. I need to draw a Vertical line across from the present month, which I am not able to do.

Any help on getting this done is highly appreciated.


I need some help with sorting data from multiple cells into a single cell. (Please see screen shot below). I need for the cells in column B that are associated with a spcific value in Column A ("Team 1" for example) to be pasted/sorted into a single cell (D12), but the text within the cells needs to be on separate lines within the cell (D12) rather then one right after the other, similar to what you would get by using a concatenate function.
Here is the screen shot:

If the user is in text box named TxtDetails, and presses enter or tab button, it must not leave the text box. Any idea how to do that?

The second problem was that vbnewline didnt actually go to new line, but displayed the "new line" sign instead. But i finally managed to fix it, by finding multiline option on the text box.

Is this possible in excel: I have a weekly report that I need to review and make changes, I have to do this in notepad, because the format is readable. Attached is an example, it does not paste well in excel or word.

Is it possible to import each row either VBA or with formula’s and to separate each line, and each part of that lines data into a separate column? To take what I can read in the txt file into excel so I can use the power of excel to keep track.

I have tried these links as well as searching the forum:

I used this but With different delimiters but it does not end well

 ' This prompts the user for a FileName as separator character
 ' and then calls ImportTextFile.
Sub DoTheImport() 
    Dim FileName As Variant 
    Dim Sep As String 
    Dim vStrtRow As Variant, vLastRow As Variant 
    Dim StrtRow As Long, LastRow As Long 
    FileName = Application.GetOpenFilename() 
    If FileName = False Then 
         ' user cancelled, get out
        Exit Sub 
    End If 
    If InStr(1, FileName, ".xls", vbTextCompare) Then 
        Dim sh As Worksheet 
        Dim r As Range, bk As Workbook 
        Dim rng As Range, v As Variant 
        Dim rw As Long, col As Long 
         ' importing from excel workbook
        Set sh = ActiveSheet 
        Set r = ActiveCell 
        Set bk = Workbooks.Open(FileName) 
        On Error Resume Next 
        Set rng = Application.InputBox("Select Area to import with mouse", _ 
        "Select Import Range", Type:=8) 
        On Error Goto 0 
        If rng Is Nothing Then 
            bk.Close SaveChanges:=False 
            Exit Sub 
        End If 
        v = rng 
        rw = rng.Rows.Count 
        col = rng.Columns.Count 
        bk.Close SaveChanges:=False 
        r.Resize(rw, col).Value = v 
        Exit Sub 
    End If 
    Sep = Application.InputBox("Enter a separator character.", Type:=2) 
    If Sep = vbNullString Then 
         ' user cancelled, get out
        Exit Sub 
    End If 
    vStrtRow = Application.InputBox("Enter StartRow or type 1", Type:=1) 
    If VarType(vStrtRow) = vbBoolean Then 
        StrtRow = 1 
        StrtRow = vStrtRow 
    End If 
    vLastRow = Application.InputBox("Enter last row to import or" & _ 
    vbNewLine & "click cancel for remainder of file", Type:=1) 
    If VarType(vLastRow) = vbBoolean Then 
        LastRow = 1000000000 '1,000,000,000
        LastRow = vLastRow 
    End If 
     'Debug.Print "FileName: " & FileName, "Separator: " & Sep
    ImportTextFile FName:=CStr(FileName), Sep:=CStr(Sep), _ 
    StrtRow:=StrtRow, LastRow:=LastRow 
End Sub 
 ' END DoTheImport
 ' ImportTextFile
 ' This imports a text file into Excel.
Public Sub ImportTextFile(FName As String, Sep As String, _ 
    StrtRow As Long, LastRow As Long) 
    Dim RowNdx As Long 
    Dim ColNdx As Integer 
    Dim TempVal As Variant 
    Dim WholeLine As String 
    Dim Pos As Integer 
    Dim NextPos As Integer 
    Dim SaveColNdx As Integer 
    Dim lnCnt As Long 
    Application.ScreenUpdating = False 
     'On Error GoTo EndMacro:
    SaveColNdx = ActiveCell.Column 
    RowNdx = ActiveCell.Row 
    Debug.Print StrtRow, LastRow 
    Open FName For Input Access Read As #1 
    lnCnt = 0 
    While Not EOF(1) 
        Line Input #1, WholeLine 
        lnCnt = lnCnt + 1 
        If Right(WholeLine, 1)  Sep Then 
            WholeLine = WholeLine & Sep 
        End If 
        If lnCnt >= StrtRow And lnCnt = 1 
                TempVal = Mid(WholeLine, Pos, NextPos - Pos) 
                Cells(RowNdx, ColNdx).Value = TempVal 
                Pos = NextPos + 1 
                ColNdx = ColNdx + 1 
                NextPos = InStr(Pos, WholeLine, Sep) 
            RowNdx = RowNdx + 1 
        End If 
    On Error Goto 0 
    Application.ScreenUpdating = True 
    Close #1 
     ' END ImportTextFile
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
I have been at this for weeks.
Is this even possible with this text format. Any direction would be greatly appreciated.

For a line chart with two lines and a singe point formated on each line (xlMarketSyleCircle for example), the legend shows the names of each line. But only ONE line in the chart and a single point formated, the legend shows the entire list of points. Could someone please tell me how I can get the legend to show the name of the line in this instance, instead of the entire list of points.
many thanks

No luck finding an answer? You could always try Google.