UTEC maps cell coloring
Thread Starter
Registered User
iTrader: (1)
Joined: Aug 2003
Posts: 505
Likes: 0
From: Ottawa, ON, Canada
Hi,
As some of you may know Jeff's software UTI-ME includes cell coloring for the timing map, but NOT for the fuel map. I'm not sure why that's the case, but since I find this feature quite useful to quickly see errors in the values and make sure the transitions are smooth, I wrote a little VB script to color the cells in Excel. Of course, you need to import the values from your TXT map file into Excel, which is easy to do. It can be used for fuel, but also for timing values if you adjust the range of Min & max values. Here it is:
Sub ColorCells()
Dim colorIndex As Integer
Dim MaxVal As Double
Dim MinVal As Double
Dim DiffVal As Double
Set myRange = Worksheets("Sheet1").Range("A1:K35")
MinVal = Int(Application.WorksheetFunction.Min(Range("B1:K35")))
MaxVal = Int(Application.WorksheetFunction.Max(Range("B1:K35")))
DiffVal = Int(MaxVal - MinVal)
Cells(37, 2).Value = MinVal
Cells(38, 2).Value = MaxVal
For Each Cell In myRange
If Cell.Value > 0 Then
colorIndex = Int(((Int(Cell.Value)) - MinVal) * 255 / DiffVal)
Cell.Interior.Color = RGB(255 - colorIndex, 255 - colorIndex, 255)
Else
Cell.Interior.Color = RGB(255, 0, 0)
End If
Next
End Sub
I attached my Excel file in case you want to use it (you need to enable macros). Please let me know if you have any questions.
As some of you may know Jeff's software UTI-ME includes cell coloring for the timing map, but NOT for the fuel map. I'm not sure why that's the case, but since I find this feature quite useful to quickly see errors in the values and make sure the transitions are smooth, I wrote a little VB script to color the cells in Excel. Of course, you need to import the values from your TXT map file into Excel, which is easy to do. It can be used for fuel, but also for timing values if you adjust the range of Min & max values. Here it is:
Sub ColorCells()
Dim colorIndex As Integer
Dim MaxVal As Double
Dim MinVal As Double
Dim DiffVal As Double
Set myRange = Worksheets("Sheet1").Range("A1:K35")
MinVal = Int(Application.WorksheetFunction.Min(Range("B1:K35")))
MaxVal = Int(Application.WorksheetFunction.Max(Range("B1:K35")))
DiffVal = Int(MaxVal - MinVal)
Cells(37, 2).Value = MinVal
Cells(38, 2).Value = MaxVal
For Each Cell In myRange
If Cell.Value > 0 Then
colorIndex = Int(((Int(Cell.Value)) - MinVal) * 255 / DiffVal)
Cell.Interior.Color = RGB(255 - colorIndex, 255 - colorIndex, 255)
Else
Cell.Interior.Color = RGB(255, 0, 0)
End If
Next
End Sub
I attached my Excel file in case you want to use it (you need to enable macros). Please let me know if you have any questions.
Last edited by Madelinot; Jun 11, 2008 at 08:28 AM.
Originally Posted by Ahsmo
I am having trouble getting the damn thing to log anything, otherwise this would be cool
Same problem, sometimes it will log and sometimes not. I also have a problem hitting all the cells
Thread
Thread Starter
Forum
Replies
Last Post
350Z Project X
Suspension
9
Oct 10, 2015 09:23 AM




