# 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.

Re: Trend Line Not Matching

Hi

This is working.
How did you get these numbers?

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?

## Files

Re: Compare Ranges And Delete Duplicates

This works fine.

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
``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
``````Sub compare()
Dim c As Integer, r As Integer, rng1 As Range, rng2 As Range
r = 1
Set rng1 = Range(Cells(16 + r, 1), Cells(16 + r, 14))
Set rng2 = Range(Cells(16 + r + 1, 1), Cells(16 + r + 1, 14))
' r will be incremented to comapre other ranges in a loop
End Sub``````

## Files

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

Re: Activate Corresponding Cell With Sheet Change

I tried this code and give errors....not clear about strrange...could you please explain this.

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
``````Private Sub Worksheet_Activate()
Dim r As Integer, c As Integer
r = Worksheets("Path A").ActiveCell.Row
c = Worksheets("Path A").ActiveCell.Column
Worksheets("PathB").Cells(r, c).Activate
End Sub``````

Re: Copy Only Values To Destination

Hi
I tried this and not working

Code
``````rngtocopy.Copy
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
``````Set rngtocopy = Nothing
On Error Resume Next
Set rngtocopy = Range(rngdata(2, 9), rngdata(lngrows - 2, 9)).SpecialCells(xlCellTypeVisible)

On Error GoTo 0
If Not rngtocopy Is Nothing Then
rngtocopy.Copy Destination:=Cells(5, 14 + cc + (t - 1) * 3 + (i - 1) * 17)``````

Thanks

Re: List Of Folder Names Missing Leading Zeros

Hello
Following technique works:

Code
``Cells(3 + i, 1).Value = "'" & f1.Name``

Thanks
Leyo

Re: List Of Folder Names Missing Leading Zeros

Formating the column as text is not helping.

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
``````Dim retval
retval = Shell("NOTEPAD.EXE " & Filename, vbNormalFocus)``````

how to open Hyperterminal using the above method. I tried

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

not working...

Re: Interpolation of values

Yes Sir...

Re: Interpolation of values

Hello

This works fine. I didn't understand the logic behind this. Could you please explain this little bit more.

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

Re: Worksheet Events To Trigger Other Worksheets

Thanks. This works fine...

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?