Hi!
i have excel form 8 to 40 rows
find the specific column which put tick mark when it has left column has numbers with screen, if it matches put tick mark in that specific oolumn
for exampl Mar.2 mar4, mar.12 there are three column
find mar.12 column put tick mark if the mar.4 has number with screen value or if the mar.4 has tick mark check with mar.2 with screen value, if it matches put tick mark in mar.12 if it differes the screen value put in mar.12
i have code. but still stuggling how to find mar.2 or mar.4 has numbers.
here is the code
--------------------------------
ith Worksheets("Sheet1").Range("F7:I7")
Myday = Format((Myday), "mmm.d")
Set c = .Find(Myday, LookIn:=xlValues)
If Not c Is Nothing Then
MyCl = c.Column
If Cells(x, MyCl).Text <> "" Then '' check to see if data exist if it does go to next date
Do
c.Value = Myday
Set c = .FindNext(c)
If Cells(x, c.Column).Text = "" Then
MyCl = c.Column
Exit Do
End If
Loop While Not c Is Nothing And MyCol <> c.Column
End If
End If
End With
MyScreen.WaitHostQuiet (g_HostSettleTimE)
' MyScreen.PutString "s", x, 29
Do
If x > 40 Then Exit Do
For j = 8 To 23
MyScreen.PutString "s", j, 29
MyScreen.SendKeys ("<ENTER>")
MyScreen.Moveto 2, 40
MyScreen.SendKeys ("b")
MyScreen.SendKeys ("<ENTER>")
MyScreen.WaitHostQuiet (g_HostSettleTimE)
If MyScreen.GetString(1, 59, 8) = "OMC9979" Then
Set MYArea = MyScreen.Search("DEFINED:")
If MYArea = "DEFINED:" Then
MyScreen.Moveto MYArea.Bottom, MYArea.Left
MYRw = MyScreen.Row
MyCol = MyScreen.Col
Mytotal1 = Trim(MyScreen.GetString(MYRw, (MyCol + 8), 70))
Mytotal2 = Cells(x, (MyCl - 1)).Value
MyScreen.WaitHostQuiet (g_HostSettleTimE)
Mytotal3 = Cells(x, (MyCl - 2)).Text
Mytotal4 = Cells(x, (MyCl - 3)).Text
If Cells(x, (MyCl - 1)).Value = "ü" Then
If Trim(Mytotal3) = Mytotal1 Then
Cells(x, (MyCl)).Value = "ü"
Cells(x, (MyCl)).Characters.Font.Name = "Wingdings"
Else
Cells(x, (MyCl)).Value = Mytotal1
End If
Else
If Mytotal1 = Trim(Mytotal3) Then
Cells(x, (MyCl)).Value = "ü"
Cells(x, (MyCl)).Characters.Font.Name = "Wingdings"
Else
Cells(x, (MyCl)).Value = Mytotal1
End If
End If
i have excel form 8 to 40 rows
find the specific column which put tick mark when it has left column has numbers with screen, if it matches put tick mark in that specific oolumn
for exampl Mar.2 mar4, mar.12 there are three column
find mar.12 column put tick mark if the mar.4 has number with screen value or if the mar.4 has tick mark check with mar.2 with screen value, if it matches put tick mark in mar.12 if it differes the screen value put in mar.12
i have code. but still stuggling how to find mar.2 or mar.4 has numbers.
here is the code
--------------------------------
ith Worksheets("Sheet1").Range("F7:I7")
Myday = Format((Myday), "mmm.d")
Set c = .Find(Myday, LookIn:=xlValues)
If Not c Is Nothing Then
MyCl = c.Column
If Cells(x, MyCl).Text <> "" Then '' check to see if data exist if it does go to next date
Do
c.Value = Myday
Set c = .FindNext(c)
If Cells(x, c.Column).Text = "" Then
MyCl = c.Column
Exit Do
End If
Loop While Not c Is Nothing And MyCol <> c.Column
End If
End If
End With
MyScreen.WaitHostQuiet (g_HostSettleTimE)
' MyScreen.PutString "s", x, 29
Do
If x > 40 Then Exit Do
For j = 8 To 23
MyScreen.PutString "s", j, 29
MyScreen.SendKeys ("<ENTER>")
MyScreen.Moveto 2, 40
MyScreen.SendKeys ("b")
MyScreen.SendKeys ("<ENTER>")
MyScreen.WaitHostQuiet (g_HostSettleTimE)
If MyScreen.GetString(1, 59, 8) = "OMC9979" Then
Set MYArea = MyScreen.Search("DEFINED:")
If MYArea = "DEFINED:" Then
MyScreen.Moveto MYArea.Bottom, MYArea.Left
MYRw = MyScreen.Row
MyCol = MyScreen.Col
Mytotal1 = Trim(MyScreen.GetString(MYRw, (MyCol + 8), 70))
Mytotal2 = Cells(x, (MyCl - 1)).Value
MyScreen.WaitHostQuiet (g_HostSettleTimE)
Mytotal3 = Cells(x, (MyCl - 2)).Text
Mytotal4 = Cells(x, (MyCl - 3)).Text
If Cells(x, (MyCl - 1)).Value = "ü" Then
If Trim(Mytotal3) = Mytotal1 Then
Cells(x, (MyCl)).Value = "ü"
Cells(x, (MyCl)).Characters.Font.Name = "Wingdings"
Else
Cells(x, (MyCl)).Value = Mytotal1
End If
Else
If Mytotal1 = Trim(Mytotal3) Then
Cells(x, (MyCl)).Value = "ü"
Cells(x, (MyCl)).Characters.Font.Name = "Wingdings"
Else
Cells(x, (MyCl)).Value = Mytotal1
End If
End If