Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro: If
Hi all,
i have a problem with the floowing code For i = 5 To wks1.Cells(Rows.Count, "O").End(xlUp).Row If wks1.Cells(i, "O").Value 10 Then iAnz = iAnz + 1 wks2.Rows(iAnz).Value = wks1.Rows(i).Value End If Next i For i = 5 To wks1.Cells(Rows.Count, "O").End(xlUp).Row If wks1.Cells(i, "O").Value = 0 And (wks1.Cells(i, "B") Is Not "unbekannt") Then iAnz = iAnz + 1 wks2.Rows(iAnz).Value = wks1.Rows(i).Value End If Next i The first part works fine but the second part brings a type error Isnt it possible to examine if Column O has value 0 and Column B /= "unbekannt" Thanks alot in advance philipp |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro: If
It is, but you have to get the syntax correct
If wks1.Cells(i, "O").Value = 0 And (wks1.Cells(i, "B").Value < "unbekannt") -- HTH RP (remove nothere from the email address if mailing direct) "Philipp Oberleitner" wrote in message ... Hi all, i have a problem with the floowing code For i = 5 To wks1.Cells(Rows.Count, "O").End(xlUp).Row If wks1.Cells(i, "O").Value 10 Then iAnz = iAnz + 1 wks2.Rows(iAnz).Value = wks1.Rows(i).Value End If Next i For i = 5 To wks1.Cells(Rows.Count, "O").End(xlUp).Row If wks1.Cells(i, "O").Value = 0 And (wks1.Cells(i, "B") Is Not "unbekannt") Then iAnz = iAnz + 1 wks2.Rows(iAnz).Value = wks1.Rows(i).Value End If Next i The first part works fine but the second part brings a type error Isnt it possible to examine if Column O has value 0 and Column B /= "unbekannt" Thanks alot in advance philipp |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro: If
I think you need:
If wks1.Cells(i, "O").Value = 0 And (wks1.Cells(i, "B") < "unbekannt") "Philipp Oberleitner" wrote: Hi all, i have a problem with the floowing code For i = 5 To wks1.Cells(Rows.Count, "O").End(xlUp).Row If wks1.Cells(i, "O").Value 10 Then iAnz = iAnz + 1 wks2.Rows(iAnz).Value = wks1.Rows(i).Value End If Next i For i = 5 To wks1.Cells(Rows.Count, "O").End(xlUp).Row If wks1.Cells(i, "O").Value = 0 And (wks1.Cells(i, "B") Is Not "unbekannt") Then iAnz = iAnz + 1 wks2.Rows(iAnz).Value = wks1.Rows(i).Value End If Next i The first part works fine but the second part brings a type error Isnt it possible to examine if Column O has value 0 and Column B /= "unbekannt" Thanks alot in advance philipp |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |