Posts by ljoseph

    Re: Trend Line Not Matching


    Quote from Wigi

    Right click the equation border, format, Number, more decimals.


    Hi
    Do you mean the equation diaplayed on the chart...
    I am not able to figure this out.

    Hello


    In the attached file, I have plotted X and Y and added a trend line with the equation displayed. Now, calauted the y values for each x values using this equation. The y values are not mathcing very well. What is the mistake I am making here?

    Re: Compare Ranges And Delete Duplicates


    Hello
    Sorry, for the confusion. I am looking for columns 1 to 11. For example rows 19 and 20 are same from column1 to 11. In this case I want to dlete row 20.[hr]*[/hr] Auto Merged Post Until 24 Hrs Passes;[dl]*[/dl]Hi
    With the following code, I will be able to take out the unique:

    Code
    1. Range("A16:K114").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("p16"), Unique:=True


    Now, the unique data in the range ("A16:K114") has been placed at ("p16"). But, I am missing corrsponding information from columns 12 to 14 (Corresponding data from columns L, M and N should go oto Columns AA, AB and AC). How to get this? Once I get this, I want to copy data in range(P16:aa16.end(xl)down) to range("a16").

    Hello


    In the attached sheet, some of the rows are repeated, whcih i want to detect and delete. Defined two ranges rng1 and rng2. Is there a way easire way to comapre rng1 and rng2 without comparing each elements of rng1 and rng2?

    Code
    1. Sub compare()
    2. Dim c As Integer, r As Integer, rng1 As Range, rng2 As Range
    3. r = 1
    4. Set rng1 = Range(Cells(16 + r, 1), Cells(16 + r, 14))
    5. Set rng2 = Range(Cells(16 + r + 1, 1), Cells(16 + r + 1, 14))
    6. ' r will be incremented to comapre other ranges in a loop
    7. End Sub

    Files

    • compare.xls

      (39.94 kB, downloaded 98 times, last: )

    Re: Activate Corresponding Cell With Sheet Change


    Hello


    I have pasted this in the "This Workbook". When differeent sheets are activated, getting the error code 1004. This error is in the line


    Then Range(strRange).Select


    Could you please explain hoe strRange works.[hr]*[/hr] Auto Merged Post;[dl]*[/dl]After adding the code, I save the file and is working now....Was getting the error when it was not saved.
    Thanks

    Hello


    I have workbook with two sheets "Path A" and "Path B". Whenever I activate worksheet "Path B", I want to activate the cell in "Path B " which was the active cell in sheet "path A". For example, if cell R1 was active in path A when Path B was activated, R1 should be made the activecell of Path B. Tried the follwing code... not working.

    Code
    1. Private Sub Worksheet_Activate()
    2. Dim r As Integer, c As Integer
    3. r = Worksheets("Path A").ActiveCell.Row
    4. c = Worksheets("Path A").ActiveCell.Column
    5. Worksheets("PathB").Cells(r, c).Activate
    6. End Sub

    Re: Copy Only Values To Destination


    Hi
    I tried this and not working

    Code
    1. rngtocopy.Copy
    2. Cells(5, 14 + cc + (t - 1) * 3 + (i - 1) * 17).PasteSpecial (xlValues)

    [hr]*[/hr] Auto Merged Post;[dl]*[/dl]Sorry, i typed something wrong.
    This method works fine.

    Hello


    I have the following code to copy a range to another destination. I would like only the value to go to the destination. How to implement this?

    Code
    1. Set rngtocopy = Nothing
    2. On Error Resume Next
    3. Set rngtocopy = Range(rngdata(2, 9), rngdata(lngrows - 2, 9)).SpecialCells(xlCellTypeVisible)
    4. On Error GoTo 0
    5. If Not rngtocopy Is Nothing Then
    6. rngtocopy.Copy Destination:=Cells(5, 14 + cc + (t - 1) * 3 + (i - 1) * 17)


    Thanks

    Hello


    I have sub folders with names 0001, 003A, 0032 etc in a main folder. I am using the following code to copy these sub folders name to the worksheet column A. This works well except that folder 0001 is copied as 1, 0032 as 32. How to modify the code so that 0001 is displayed in column A instaed of 1.

    Hello


    I can use the following code to open Notepad from Excel Vba:

    Code
    1. Dim retval
    2. retval = Shell("NOTEPAD.EXE " & Filename, vbNormalFocus)


    how to open Hyperterminal using the above method. I tried

    Code
    1. Dim retval
    2. retval = Shell("hyperterminal.EXE " & Filename, vbNormalFocus)


    not working...

    Hello


    In the attached sheet, I have measured data from a device. It shows Input, Output, gain and delta. You can see as input increases, delta comes down. I want to find the output corresponding to delta od -1. In the table, I have enteries for delta of -0.982 then -1.382, not for -1. How to find output corresponding to delta of -1?

    Files

    • Book1.xls

      (16.9 kB, downloaded 269 times, last: )

    Re: Worksheet Events To Trigger Other Worksheets


    Thanks


    What I want is if anything on sheet1,2 or 3 changes, the code shoud execute. So, I guess in each sheet, I have to have the worksheet change event which will excecute the code. Can we implement this using workbook events?