[s-cars] NAC - Help with excel

Kent McLean kentmclean at mindspring.com
Wed Apr 20 10:08:56 EDT 2005


Mark Strangways wrote:
> I have a *bunch* of data to parse in order to make a Dyno chart.

How is the data organized now?

If it's by each dyno run (row1: HP at RPM, HP at RPM, HP at RPM),
it should be easy to set up each run as a row, each column
as an RPM, and each cell contains the HP/torque figure at
that RPM. Then you can select all the data, and sort it
(Data->Sort).

A macro (Tools->Macro->Macros) can compare cell to the
previous one (one row above), and delete the current row
if they match.  Here is a subroutine that does just that:

Sub test()
     If ActiveCell.Value = ActiveCell.Offset(-1, 0).Value Then
         Selection.EntireRow.Delete
     Else
         ActiveCell.Offset(1, 0).Select
     End If
End Sub

This subroutine compares the current cell to the cell 1 row
above (offset(-1,0)), and if they match, it deletes the row.
If they don't match, it advances to the cell one row below
(offset(1,0)).

You can assign the macro to a Hot Key (e.g., Control-T) and
use it manually, or put it in a loop to run automatically
(add some code to the subroutine, "for 1 to 1000").

HTH.
--
Kent McLean
'94 100 S Avant, "Moody"
'89 200 TQ, "Bad Puppy" up in smoke
'56 Austin-Healey 100 BN2, for sale


More information about the S-CAR-List mailing list