VBA Help

bboysen

New Member
Joined
Aug 6, 2010
Messages
44
Ok so this works but then again it dose not please let me know where i have gone wrong!


'Callback for btn_LWccode onAction
Sub LWccodeCallback(control As IRibbonControl)
LWccode
End Sub
Sub LWccode()


Dim finalrow As Long
Dim finalcol As Long
Dim D As Long
Dim C As Long
Dim E As Long
Dim F As Long
Dim rRange As Excel.Range


finalrow = ActiveSheet.UsedRange.Rows.Count
Count = 1
finalcol = ActiveSheet.UsedRange.Column - 1 + _
ActiveSheet.UsedRange.Columns.Count


For D = 2 To finalrow
For C = 1 To finalcol


'User Input for Range to be Colored
Set rRange = Application.InputBox(Prompt:= _
"Please select Range.", _
Title:="SPECIFY Color Range", TYPE:=8)






'FIND LE AND COLOR THEM
If Cells(D, C).Value = "LE" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End If

'FIND BB OF PI AND COLOR THEM
If Cells(D, C).Value = "BB" _
Or Cells(D, C).Value = "PI" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.399975585192419
.PatternTintAndShade = 0
End With

End If

'FIND EB OF PI AND COLOR THEM
If Cells(D, C).Value = "EB" _
And Cells(D, C).Value = "PI" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.399975585192419
.PatternTintAndShade = 0
End With
End If
'FIND BB OF SAG AND COLOR THEM
If Cells(D, C).Value = "BB" _
Or Cells(D, C).Value = "SAG" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
End If

'FIND EB OF SAG AND COLOR THEM
If Cells(D, C).Value = "EB" _
And Cells(D, C).Value = "SAG" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
End If

'FIND BB OF OB AND COLOR THEM
If Cells(D, C).Value = "BB" _
Or Cells(D, C).Value = "OB" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
End If

'FIND EB OF OB AND COLOR THEM
If Cells(D, C).Value = "EB" _
Or Cells(D, C).Value = "OB" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
End If

'FIND BB OF OVERBEND AND COLOR THEM
If Cells(D, C).Value = "BB" _
Or Cells(D, C).Value = "OVERBEND" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
End If

'FIND EB OF OVERBEND AND COLOR THEM
If Cells(D, C).Value = "EB" _
Or Cells(D, C).Value = "OVERBEND" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
End If

'FIND BEND WITH PI AND COLOR THEM
If Cells(D, C).Value = "BND" _
Or Cells(D, C).Value = "PIL" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 10855845
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End If

'FIND BEND WITH PI AND COLOR THEM
If Cells(D, C).Value = "BND" _
Or Cells(D, C).Value = "PIR" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 10855845
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End If

'FIND OVERBENDS AND COLOR THEM
If Cells(D, C).Value = "BND" _
Or Cells(D, C).Value = "OVERBEND" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = -0.249946592608417
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End If

'FIND SAGS AND COLOR THEM
If Cells(D, C).Value = "BND" _
Or Cells(D, C).Value = "SAG" Then
Cells(D, C).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = -0.249946592608417
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End If

'FIND PIPECHANGE INFO AND COLOR THEM
If Cells(D, C).Value = "PIP" Then
Cells(D, C).EntireRow.Select

With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorLight2
.TintAndShade = 0.399975585192419
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End If

'FIND CROSSING INFO AND COLOR THEM

If Cells(D, C).Value = "RD" _
Or Cells(D, C).Value = "DCH" _
Or Cells(D, C).Value = "HWY" _
Or Cells(D, C).Value = "FNC" _
Or Cells(D, C).Value = "RCK" Then
Cells(D, C).EntireRow.Select

With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent3
.TintAndShade = 0.399975585192419
.PatternTintAndShade = 0
End With
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
End If



Next C
Next D
'CLEAR THE COLOR FROM REST OF WORK SHEET
Columns("V:V").Select
Range(Selection, Selection.End(xlToRight)).Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With


End Sub
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
please let me know where i have gone wrong!
Ha! Not until you tell us what it's NOT doing! Oh, and provide a link to a sample workbook.

And one more thing. Please use code tags around your posted code so it will format correctly. It's the hash icon on the message bar.
 
Upvote 0
Ha! Not until you tell us what it's NOT doing! Oh, and provide a link to a sample workbook.

And one more thing. Please use code tags around your posted code so it will format correctly. It's the hash icon on the message bar.


Ha sorry about that still trying to learn how to post on this.
Ok so what i am trying to do is to color a selection based of the code name in the spread sheet below.

I have the vba set up to color the whole file but once I start adding a lot of data into it slows down a lot and can take some time to color the spread sheet.
It will color the le code red and so on an so forth.

What I would like to do is color base on a selection of data and not the whole file each time.

Also on the if statements i would like to be able for it to look for say BB and then once it found that make sure it has PI in that row and color it one color then look for BB and SAG and have it color it a different color.
I have tried to use the and statement but I will color anything.

The other thing is that the Code with change location from file to file it is not in a set location.

If there is anyway to clean the code up that would be nice.

Thanks for your help!

Code:
[COLOR=#333333]Sub LWccode()[/COLOR]


[COLOR=#333333]Dim finalrow As Long[/COLOR]
[COLOR=#333333]Dim finalcol As Long[/COLOR]
[COLOR=#333333]Dim D As Long[/COLOR]
[COLOR=#333333]Dim C As Long[/COLOR]
[COLOR=#333333]Dim E As Long[/COLOR]
[COLOR=#333333]Dim F As Long[/COLOR]
[COLOR=#333333]Dim rRange As Excel.Range[/COLOR]


[COLOR=#333333]finalrow = ActiveSheet.UsedRange.Rows.Count[/COLOR]
[COLOR=#333333]Count = 1[/COLOR]
[COLOR=#333333]finalcol = ActiveSheet.UsedRange.Column - 1 + _[/COLOR]
[COLOR=#333333]ActiveSheet.UsedRange.Columns.Count[/COLOR]


[COLOR=#333333]For D = 2 To finalrow[/COLOR]
[COLOR=#333333]For C = 1 To finalcol[/COLOR]


[COLOR=#333333]'User Input for Range to be Colored[/COLOR]
[COLOR=#333333]Set rRange = Application.InputBox(Prompt:= _[/COLOR]
[COLOR=#333333]"Please select Range.", _[/COLOR]
[COLOR=#333333]Title:="SPECIFY Color Range", TYPE:=8)[/COLOR]






[COLOR=#333333]'FIND LE AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "LE" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].Color = 255[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]With Selection.Font[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorDark1[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND BB OF PI AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "BB" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "PI" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent6[/COLOR]
[COLOR=#333333].TintAndShade = 0.399975585192419[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]

[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND EB OF PI AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "EB" _[/COLOR]
[COLOR=#333333]And Cells(D, C).Value = "PI" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent6[/COLOR]
[COLOR=#333333].TintAndShade = 0.399975585192419[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]
[COLOR=#333333]'FIND BB OF SAG AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "BB" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "SAG" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent5[/COLOR]
[COLOR=#333333].TintAndShade = 0.599993896298105[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND EB OF SAG AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "EB" _[/COLOR]
[COLOR=#333333]And Cells(D, C).Value = "SAG" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent5[/COLOR]
[COLOR=#333333].TintAndShade = 0.599993896298105[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND BB OF OB AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "BB" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "OB" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent5[/COLOR]
[COLOR=#333333].TintAndShade = 0.599993896298105[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND EB OF OB AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "EB" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "OB" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent5[/COLOR]
[COLOR=#333333].TintAndShade = 0.599993896298105[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND BB OF OVERBEND AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "BB" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "OVERBEND" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent5[/COLOR]
[COLOR=#333333].TintAndShade = 0.599993896298105[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND EB OF OVERBEND AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "EB" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "OVERBEND" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent5[/COLOR]
[COLOR=#333333].TintAndShade = 0.599993896298105[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND BEND WITH PI AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "BND" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "PIL" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].Color = 10855845[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]With Selection.Font[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorDark1[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND BEND WITH PI AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "BND" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "PIR" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].Color = 10855845[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]With Selection.Font[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorDark1[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND OVERBENDS AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "BND" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "OVERBEND" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent5[/COLOR]
[COLOR=#333333].TintAndShade = -0.249946592608417[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]With Selection.Font[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorDark1[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND SAGS AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "BND" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "SAG" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent5[/COLOR]
[COLOR=#333333].TintAndShade = -0.249946592608417[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]With Selection.Font[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorDark1[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND PIPECHANGE INFO AND COLOR THEM[/COLOR]
[COLOR=#333333]If Cells(D, C).Value = "PIP" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]

[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorLight2[/COLOR]
[COLOR=#333333].TintAndShade = 0.399975585192419[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]With Selection.Font[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorDark1[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]

[COLOR=#333333]'FIND CROSSING INFO AND COLOR THEM[/COLOR]

[COLOR=#333333]If Cells(D, C).Value = "RD" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "DCH" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "HWY" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "FNC" _[/COLOR]
[COLOR=#333333]Or Cells(D, C).Value = "RCK" Then[/COLOR]
[COLOR=#333333]Cells(D, C).EntireRow.Select[/COLOR]

[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlSolid[/COLOR]
[COLOR=#333333].PatternColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].ThemeColor = xlThemeColorAccent3[/COLOR]
[COLOR=#333333].TintAndShade = 0.399975585192419[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]With Selection.Font[/COLOR]
[COLOR=#333333].ColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]End If[/COLOR]



[COLOR=#333333]Next C[/COLOR]
[COLOR=#333333]Next D[/COLOR]
[COLOR=#333333]'CLEAR THE COLOR FROM REST OF WORK SHEET[/COLOR]
[COLOR=#333333]Columns("V:V").Select[/COLOR]
[COLOR=#333333]Range(Selection, Selection.End(xlToRight)).Select[/COLOR]
[COLOR=#333333]With Selection.Interior[/COLOR]
[COLOR=#333333].Pattern = xlNone[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333].PatternTintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]
[COLOR=#333333]With Selection.Font[/COLOR]
[COLOR=#333333].ColorIndex = xlAutomatic[/COLOR]
[COLOR=#333333].TintAndShade = 0[/COLOR]
[COLOR=#333333]End With[/COLOR]


[COLOR=#333333]End Sub 
[/COLOR]

I think i have done that table right if not please let me know how to do it!

[TABLE="class: grid, width: 1276, align: left"]
<tbody>[TR]
[TD]NAME[/TD]
[TD]CODE[/TD]
[TD]MILEPOST[/TD]
[TD]STATION[/TD]
[TD]SLOPE DIST.[/TD]
[TD]NORTHING[/TD]
[TD]EASTING[/TD]
[TD]ELEV[/TD]
[TD]WGS LAT DEG.[/TD]
[TD]WGS LONG DEG.[/TD]
[TD]ATTRIBUTE 1[/TD]
[TD]ATTRIBUTE 2[/TD]
[TD]ATTRIBUTE 3[/TD]
[TD]ATTRIBUTE 4[/TD]
[TD]ATTRIBUTE 5[/TD]
[TD]ATTRIBUTE 6[/TD]
[/TR]
[TR]
[TD="align: right"]200112[/TD]
[TD]LE[/TD]
[TD="align: right"]105.4420455[/TD]
[TD="align: right"]556734[/TD]
[TD][/TD]
[TD="align: right"]16815311.61[/TD]
[TD="align: right"]1814913.099[/TD]
[TD="align: right"]3201.463[/TD]
[TD]46.27935°N[/TD]
[TD]-104.30964°W[/TD]
[TD]525-8[/TD]
[TD]R43923[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200114[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.453991[/TD]
[TD="align: right"]556797.0725[/TD]
[TD="align: right"]63.07251473[/TD]
[TD="align: right"]16815267.03[/TD]
[TD="align: right"]1814957.714[/TD]
[TD="align: right"]3201.95[/TD]
[TD]46.27922°N[/TD]
[TD]-104.30946°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200115[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.468893[/TD]
[TD="align: right"]556875.7552[/TD]
[TD="align: right"]78.68270522[/TD]
[TD="align: right"]16815211.48[/TD]
[TD="align: right"]1815013.442[/TD]
[TD="align: right"]3203.27[/TD]
[TD]46.27907°N[/TD]
[TD]-104.30924°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200116[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.4700543[/TD]
[TD="align: right"]556881.8867[/TD]
[TD="align: right"]6.131434577[/TD]
[TD="align: right"]16815207.03[/TD]
[TD="align: right"]1815017.659[/TD]
[TD="align: right"]3203.467[/TD]
[TD]46.27906°N[/TD]
[TD]-104.30923°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200119[/TD]
[TD]RCK[/TD]
[TD="align: right"]105.4796312[/TD]
[TD="align: right"]556932.4526[/TD]
[TD="align: right"]50.56598542[/TD]
[TD="align: right"]16815171.34[/TD]
[TD="align: right"]1815053.475[/TD]
[TD="align: right"]3205.437[/TD]
[TD]46.27896°N[/TD]
[TD]-104.30909°W[/TD]
[TD]BEGIN[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200118[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.4809332[/TD]
[TD="align: right"]556939.3271[/TD]
[TD="align: right"]6.874467615[/TD]
[TD="align: right"]16815166.54[/TD]
[TD="align: right"]1815058.404[/TD]
[TD="align: right"]3205.758[/TD]
[TD]46.27895°N[/TD]
[TD]-104.30907°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200120[/TD]
[TD]RCK[/TD]
[TD="align: right"]105.4935547[/TD]
[TD="align: right"]557005.9686[/TD]
[TD="align: right"]66.64150377[/TD]
[TD="align: right"]16815119.54[/TD]
[TD="align: right"]1815105.649[/TD]
[TD="align: right"]3207.9[/TD]
[TD]46.27882°N[/TD]
[TD]-104.30888°W[/TD]
[TD]END[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200121[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.4939485[/TD]
[TD="align: right"]557008.0478[/TD]
[TD="align: right"]2.079223414[/TD]
[TD="align: right"]16815118.16[/TD]
[TD="align: right"]1815107.198[/TD]
[TD="align: right"]3207.979[/TD]
[TD]46.27881°N[/TD]
[TD]-104.30888°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200122[/TD]
[TD]RCK[/TD]
[TD="align: right"]105.5031634[/TD]
[TD="align: right"]557056.7025[/TD]
[TD="align: right"]48.65468184[/TD]
[TD="align: right"]16815083.56[/TD]
[TD="align: right"]1815141.406[/TD]
[TD="align: right"]3210.147[/TD]
[TD]46.27872°N[/TD]
[TD]-104.30874°W[/TD]
[TD]BEGIN[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200123[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.5088302[/TD]
[TD="align: right"]557086.6235[/TD]
[TD="align: right"]29.92095929[/TD]
[TD="align: right"]16815062.59[/TD]
[TD="align: right"]1815162.748[/TD]
[TD="align: right"]3211.011[/TD]
[TD]46.27866°N[/TD]
[TD]-104.30866°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200130[/TD]
[TD]RCK[/TD]
[TD="align: right"]105.5157614[/TD]
[TD="align: right"]557123.2199[/TD]
[TD="align: right"]36.59647137[/TD]
[TD="align: right"]16815036.63[/TD]
[TD="align: right"]1815188.549[/TD]
[TD="align: right"]3211.742[/TD]
[TD]46.27859°N[/TD]
[TD]-104.30856°W[/TD]
[TD]END[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200125[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.5236147[/TD]
[TD="align: right"]557164.6854[/TD]
[TD="align: right"]41.46541424[/TD]
[TD="align: right"]16815007.15[/TD]
[TD="align: right"]1815217.702[/TD]
[TD="align: right"]3212.998[/TD]
[TD]46.2785°N[/TD]
[TD]-104.30844°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200126[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.5385542[/TD]
[TD="align: right"]557243.5664[/TD]
[TD="align: right"]78.88099726[/TD]
[TD="align: right"]16814951.07[/TD]
[TD="align: right"]1815273.182[/TD]
[TD="align: right"]3215.068[/TD]
[TD]46.27835°N[/TD]
[TD]-104.30823°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200127[/TD]
[TD]BND[/TD]
[TD="align: right"]105.5418114[/TD]
[TD="align: right"]557260.7639[/TD]
[TD="align: right"]17.19757346[/TD]
[TD="align: right"]16814938.93[/TD]
[TD="align: right"]1815285.365[/TD]
[TD="align: right"]3215.439[/TD]
[TD]46.27832°N[/TD]
[TD]-104.30818°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]1.5[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]OVERBEND[/TD]
[/TR]
[TR]
[TD="align: right"]200131[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.5521641[/TD]
[TD="align: right"]557315.4263[/TD]
[TD="align: right"]54.66235831[/TD]
[TD="align: right"]16814900.38[/TD]
[TD="align: right"]1815324.115[/TD]
[TD="align: right"]3215.203[/TD]
[TD]46.27821°N[/TD]
[TD]-104.30803°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200132[/TD]
[TD]BND[/TD]
[TD="align: right"]105.5598343[/TD]
[TD="align: right"]557355.9253[/TD]
[TD="align: right"]40.49900011[/TD]
[TD="align: right"]16814872[/TD]
[TD="align: right"]1815353.004[/TD]
[TD="align: right"]3215.199[/TD]
[TD]46.27813°N[/TD]
[TD]-104.30791°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]1.5[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]SAG[/TD]
[/TR]
[TR]
[TD="align: right"]200134[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.5669348[/TD]
[TD="align: right"]557393.4156[/TD]
[TD="align: right"]37.49026179[/TD]
[TD="align: right"]16814845.25[/TD]
[TD="align: right"]1815379.269[/TD]
[TD="align: right"]3216.124[/TD]
[TD]46.27806°N[/TD]
[TD]-104.30781°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200135[/TD]
[TD]BB[/TD]
[TD="align: right"]105.5740868[/TD]
[TD="align: right"]557431.1784[/TD]
[TD="align: right"]37.76281193[/TD]
[TD="align: right"]16814818.86[/TD]
[TD="align: right"]1815406.283[/TD]
[TD="align: right"]3217.18[/TD]
[TD]46.27798°N[/TD]
[TD]-104.3077°W[/TD]
[TD]SAG[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200136[/TD]
[TD]BND[/TD]
[TD="align: right"]105.574894[/TD]
[TD="align: right"]557435.4404[/TD]
[TD="align: right"]4.26204892[/TD]
[TD="align: right"]16814815.69[/TD]
[TD="align: right"]1815409.133[/TD]
[TD="align: right"]3217.34[/TD]
[TD]46.27798°N[/TD]
[TD]-104.30769°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]2.5[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]SAG[/TD]
[/TR]
[TR]
[TD="align: right"]200138[/TD]
[TD]EB[/TD]
[TD="align: right"]105.5757012[/TD]
[TD="align: right"]557439.7024[/TD]
[TD="align: right"]4.26196539[/TD]
[TD="align: right"]16814812.64[/TD]
[TD="align: right"]1815412.115[/TD]
[TD="align: right"]3217.514[/TD]
[TD]46.27797°N[/TD]
[TD]-104.30768°W[/TD]
[TD]SAG[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200139[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.5811009[/TD]
[TD="align: right"]557468.2127[/TD]
[TD="align: right"]28.51028032[/TD]
[TD="align: right"]16814792.67[/TD]
[TD="align: right"]1815432.455[/TD]
[TD="align: right"]3218.808[/TD]
[TD]46.27791°N[/TD]
[TD]-104.3076°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200140[/TD]
[TD]BND[/TD]
[TD="align: right"]105.5868122[/TD]
[TD="align: right"]557498.3687[/TD]
[TD="align: right"]30.15600983[/TD]
[TD="align: right"]16814771.37[/TD]
[TD="align: right"]1815453.807[/TD]
[TD="align: right"]3220.601[/TD]
[TD]46.27785°N[/TD]
[TD]-104.30752°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]1[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]SAG[/TD]
[/TR]
[TR]
[TD="align: right"]200142[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.5958158[/TD]
[TD="align: right"]557545.9072[/TD]
[TD="align: right"]47.5385357[/TD]
[TD="align: right"]16814738.23[/TD]
[TD="align: right"]1815487.891[/TD]
[TD="align: right"]3224.122[/TD]
[TD]46.27776°N[/TD]
[TD]-104.30738°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200144[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.6104756[/TD]
[TD="align: right"]557623.3112[/TD]
[TD="align: right"]77.40399471[/TD]
[TD="align: right"]16814683.71[/TD]
[TD="align: right"]1815542.83[/TD]
[TD="align: right"]3230.095[/TD]
[TD]46.27761°N[/TD]
[TD]-104.30717°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200145[/TD]
[TD]BB[/TD]
[TD="align: right"]105.6130241[/TD]
[TD="align: right"]557636.7673[/TD]
[TD="align: right"]13.45610661[/TD]
[TD="align: right"]16814674.45[/TD]
[TD="align: right"]1815552.596[/TD]
[TD="align: right"]3231.087[/TD]
[TD]46.27758°N[/TD]
[TD]-104.30713°W[/TD]
[TD]OVERBEND[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200146[/TD]
[TD]BND[/TD]
[TD="align: right"]105.6138119[/TD]
[TD="align: right"]557640.9271[/TD]
[TD="align: right"]4.159754801[/TD]
[TD="align: right"]16814671.34[/TD]
[TD="align: right"]1815555.354[/TD]
[TD="align: right"]3231.413[/TD]
[TD]46.27758°N[/TD]
[TD]-104.30712°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]2.5[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]OVERBEND[/TD]
[/TR]
[TR]
[TD="align: right"]200148[/TD]
[TD]EB[/TD]
[TD="align: right"]105.6147177[/TD]
[TD="align: right"]557645.7094[/TD]
[TD="align: right"]4.782377862[/TD]
[TD="align: right"]16814668.17[/TD]
[TD="align: right"]1815558.941[/TD]
[TD="align: right"]3231.614[/TD]
[TD]46.27757°N[/TD]
[TD]-104.30711°W[/TD]
[TD]OVERBEND[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200149[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.6246783[/TD]
[TD="align: right"]557698.3014[/TD]
[TD="align: right"]52.59199974[/TD]
[TD="align: right"]16814631.21[/TD]
[TD="align: right"]1815596.35[/TD]
[TD="align: right"]3233.083[/TD]
[TD]46.27746°N[/TD]
[TD]-104.30696°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200150[/TD]
[TD]BB[/TD]
[TD="align: right"]105.6291492[/TD]
[TD="align: right"]557721.908[/TD]
[TD="align: right"]23.60654689[/TD]
[TD="align: right"]16814614.62[/TD]
[TD="align: right"]1815613.15[/TD]
[TD="align: right"]3232.97[/TD]
[TD]46.27742°N[/TD]
[TD]-104.30689°W[/TD]
[TD]OVERBEND[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200151[/TD]
[TD]BND[/TD]
[TD="align: right"]105.63057[/TD]
[TD="align: right"]557729.4098[/TD]
[TD="align: right"]7.501789453[/TD]
[TD="align: right"]16814609.29[/TD]
[TD="align: right"]1815618.428[/TD]
[TD="align: right"]3232.764[/TD]
[TD]46.2774°N[/TD]
[TD]-104.30687°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]5[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]OVERBEND[/TD]
[/TR]
[TR]
[TD="align: right"]200153[/TD]
[TD]EB[/TD]
[TD="align: right"]105.632139[/TD]
[TD="align: right"]557737.6939[/TD]
[TD="align: right"]8.284138097[/TD]
[TD="align: right"]16814603.58[/TD]
[TD="align: right"]1815624.428[/TD]
[TD="align: right"]3232.137[/TD]
[TD]46.27739°N[/TD]
[TD]-104.30685°W[/TD]
[TD]OVERBEND[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200325[/TD]
[TD]SDB[/TD]
[TD="align: right"]105.6344697[/TD]
[TD="align: right"]557750[/TD]
[TD][/TD]
[TD="align: right"]16814346.54[/TD]
[TD="align: right"]1815884.843[/TD]
[TD="align: right"]3258.047[/TD]
[TD]46.27668°N[/TD]
[TD]-104.30583°W[/TD]
[TD="align: right"]40[/TD]
[TD][/TD]
[TD]25 TOTAL[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200154[/TD]
[TD]BND[/TD]
[TD="align: right"]105.6368666[/TD]
[TD="align: right"]557762.6555[/TD]
[TD="align: right"]24.96161375[/TD]
[TD="align: right"]16814585.96[/TD]
[TD="align: right"]1815642.109[/TD]
[TD="align: right"]3230.199[/TD]
[TD]46.27734°N[/TD]
[TD]-104.30678°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]2[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]OVERBEND[/TD]
[/TR]
[TR]
[TD="align: right"]200156[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.6395838[/TD]
[TD="align: right"]557777.0027[/TD]
[TD="align: right"]14.34719722[/TD]
[TD="align: right"]16814575.81[/TD]
[TD="align: right"]1815652.251[/TD]
[TD="align: right"]3228.523[/TD]
[TD]46.27731°N[/TD]
[TD]-104.30674°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200158[/TD]
[TD]BB[/TD]
[TD="align: right"]105.6432591[/TD]
[TD="align: right"]557796.4079[/TD]
[TD="align: right"]19.40520386[/TD]
[TD="align: right"]16814562.05[/TD]
[TD="align: right"]1815665.935[/TD]
[TD="align: right"]3226.375[/TD]
[TD]46.27727°N[/TD]
[TD]-104.30669°W[/TD]
[TD]SAG[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200159[/TD]
[TD]BND[/TD]
[TD="align: right"]105.6453226[/TD]
[TD="align: right"]557807.3035[/TD]
[TD="align: right"]10.89552775[/TD]
[TD="align: right"]16814554.75[/TD]
[TD="align: right"]1815674.018[/TD]
[TD="align: right"]3225.418[/TD]
[TD]46.27725°N[/TD]
[TD]-104.30665°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]8[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]SAG[/TD]
[/TR]
[TR]
[TD="align: right"]200161[/TD]
[TD]EB[/TD]
[TD="align: right"]105.6473473[/TD]
[TD="align: right"]557817.9938[/TD]
[TD="align: right"]10.69033531[/TD]
[TD="align: right"]16814547.08[/TD]
[TD="align: right"]1815681.473[/TD]
[TD="align: right"]3225.283[/TD]
[TD]46.27723°N[/TD]
[TD]-104.30662°W[/TD]
[TD]SAG[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200162[/TD]
[TD]BB[/TD]
[TD="align: right"]105.6476882[/TD]
[TD="align: right"]557819.7934[/TD]
[TD="align: right"]1.799658857[/TD]
[TD="align: right"]16814545.72[/TD]
[TD="align: right"]1815682.647[/TD]
[TD="align: right"]3225.328[/TD]
[TD]46.27723°N[/TD]
[TD]-104.30662°W[/TD]
[TD]SAG[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200163[/TD]
[TD]BND[/TD]
[TD="align: right"]105.6492733[/TD]
[TD="align: right"]557828.1629[/TD]
[TD="align: right"]8.369482241[/TD]
[TD="align: right"]16814539.89[/TD]
[TD="align: right"]1815688.65[/TD]
[TD="align: right"]3225.791[/TD]
[TD]46.27721°N[/TD]
[TD]-104.3066°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]7[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]SAG[/TD]
[/TR]
[TR]
[TD="align: right"]200165[/TD]
[TD]EB[/TD]
[TD="align: right"]105.6516188[/TD]
[TD="align: right"]557840.5474[/TD]
[TD="align: right"]12.3844532[/TD]
[TD="align: right"]16814531.5[/TD]
[TD="align: right"]1815697.765[/TD]
[TD="align: right"]3227.267[/TD]
[TD]46.27719°N[/TD]
[TD]-104.30656°W[/TD]
[TD]SAG[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200166[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.6543302[/TD]
[TD="align: right"]557854.8636[/TD]
[TD="align: right"]14.31619977[/TD]
[TD="align: right"]16814521.23[/TD]
[TD="align: right"]1815707.739[/TD]
[TD="align: right"]3229.232[/TD]
[TD]46.27716°N[/TD]
[TD]-104.30652°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200167[/TD]
[TD]RCK[/TD]
[TD="align: right"]105.6614963[/TD]
[TD="align: right"]557892.7006[/TD]
[TD="align: right"]37.83699699[/TD]
[TD="align: right"]16814494.96[/TD]
[TD="align: right"]1815734.969[/TD]
[TD="align: right"]3234.386[/TD]
[TD]46.27709°N[/TD]
[TD]-104.30641°W[/TD]
[TD]BEGIN[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200168[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.6684818[/TD]
[TD="align: right"]557929.5836[/TD]
[TD="align: right"]36.88306171[/TD]
[TD="align: right"]16814469.08[/TD]
[TD="align: right"]1815761.248[/TD]
[TD="align: right"]3239.371[/TD]
[TD]46.27702°N[/TD]
[TD]-104.30631°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200169[/TD]
[TD]BB[/TD]
[TD="align: right"]105.6696041[/TD]
[TD="align: right"]557935.5097[/TD]
[TD="align: right"]5.926046323[/TD]
[TD="align: right"]16814464.7[/TD]
[TD="align: right"]1815765.232[/TD]
[TD="align: right"]3240.234[/TD]
[TD]46.277°N[/TD]
[TD]-104.3063°W[/TD]
[TD]OVERBEND[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200170[/TD]
[TD]BND[/TD]
[TD="align: right"]105.6704549[/TD]
[TD="align: right"]557940.0019[/TD]
[TD="align: right"]4.492179202[/TD]
[TD="align: right"]16814461.34[/TD]
[TD="align: right"]1815768.217[/TD]
[TD="align: right"]3240.642[/TD]
[TD]46.27699°N[/TD]
[TD]-104.30628°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]2.5[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]OVERBEND[/TD]
[/TR]
[TR]
[TD="align: right"]200172[/TD]
[TD]EB[/TD]
[TD="align: right"]105.6712541[/TD]
[TD="align: right"]557944.2215[/TD]
[TD="align: right"]4.219643587[/TD]
[TD="align: right"]16814458.66[/TD]
[TD="align: right"]1815771.473[/TD]
[TD="align: right"]3241.199[/TD]
[TD]46.27699°N[/TD]
[TD]-104.30627°W[/TD]
[TD]OVERBEND[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200173[/TD]
[TD]RCK[/TD]
[TD="align: right"]105.6748752[/TD]
[TD="align: right"]557963.3408[/TD]
[TD="align: right"]19.11928728[/TD]
[TD="align: right"]16814445.33[/TD]
[TD="align: right"]1815785.184[/TD]
[TD="align: right"]3242.927[/TD]
[TD]46.27695°N[/TD]
[TD]-104.30622°W[/TD]
[TD]END[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200174[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.6832214[/TD]
[TD="align: right"]558007.4089[/TD]
[TD="align: right"]44.06808211[/TD]
[TD="align: right"]16814414.32[/TD]
[TD="align: right"]1815816.49[/TD]
[TD="align: right"]3246.689[/TD]
[TD]46.27686°N[/TD]
[TD]-104.3061°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200176[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.6979978[/TD]
[TD="align: right"]558085.4282[/TD]
[TD="align: right"]78.01929855[/TD]
[TD="align: right"]16814359.48[/TD]
[TD="align: right"]1815871.985[/TD]
[TD="align: right"]3253.146[/TD]
[TD]46.27671°N[/TD]
[TD]-104.30588°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200177[/TD]
[TD]WELD[/TD]
[TD="align: right"]105.7123615[/TD]
[TD="align: right"]558161.2685[/TD]
[TD="align: right"]75.84027819[/TD]
[TD="align: right"]16814305.99[/TD]
[TD="align: right"]1815925.749[/TD]
[TD="align: right"]3260.495[/TD]
[TD]46.27656°N[/TD]
[TD]-104.30567°W[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200178[/TD]
[TD]BB[/TD]
[TD="align: right"]105.7219121[/TD]
[TD="align: right"]558211.6958[/TD]
[TD="align: right"]50.4273522[/TD]
[TD="align: right"]16814269.65[/TD]
[TD="align: right"]1815960.718[/TD]
[TD="align: right"]3265.194[/TD]
[TD]46.27646°N[/TD]
[TD]-104.30553°W[/TD]
[TD]OVERBEND[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]200179[/TD]
[TD]BND[/TD]
[TD="align: right"]105.7227316[/TD]
[TD="align: right"]558216.0231[/TD]
[TD="align: right"]4.327259295[/TD]
[TD="align: right"]16814266.48[/TD]
[TD="align: right"]1815963.656[/TD]
[TD="align: right"]3265.567[/TD]
[TD]46.27646°N[/TD]
[TD]-104.30552°W[/TD]
[TD]FIELD[/TD]
[TD="align: right"]2.5[/TD]
[TD]USS[/TD]
[TD][/TD]
[TD]FBE[/TD]
[TD]OVERBEND[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Ok, say tou have 1000 rows and you drop in 50 more. Instead of asking for a starting range, just be sure the cursor is in the start of the new data and

For D = activecell.row To finalrow

But after reading through this, I can't help but wonder if conditional formatting isn't better suited for this task.

If you're determined to use code, then I would use autofilter to display the conditions; then color what's visible.
 
Last edited:
Upvote 0
Ok, say tou have 1000 rows and you drop in 50 more. Instead of asking for a starting range, just be sure the cursor is in the start of the new data and

For D = activecell.row To finalrow

But after reading through this, I can't help but wonder if conditional formatting isn't better suited for this task.

If you're determined to use code, then I would use autofilter to display the conditions; then color what's visible.

Thanks that works how I wanted it to.
I am glad that I do not have to pick a range then have it run the code.

how would one go about setting up conditional formatting to handle this?

I have not used much of the conditional formatting functions other then for find duplicate values in on column.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top