- Katılım
- 31 Aralık 2009
- Mesajlar
- 1,105
- Excel Vers. ve Dili
- excel 2007 türkçe
Excel Vers. ve Dili Ofis 2003
Merhabalar
Makro kodu içindeki sumproduct hata değeri döndürüyor.Nasıl düzeltebiliriz.Amaç "P" sütununda "D" sütununun toplamını altırmak.
Cells(x, "P") = Evaluate("SumProduct((=D10
" & sonsat3 & "=D" & x & "),O10:O" & sonsat3 & ") & ")
Makro kodu içindeki sumproduct hata değeri döndürüyor.Nasıl düzeltebiliriz.Amaç "P" sütununda "D" sütununun toplamını altırmak.
Cells(x, "P") = Evaluate("SumProduct((=D10
Kod:
Sub dd()
sonsat3 = ThisWorkbook.Sheets("Sayfa1").Cells(65536, "e").End(xlUp).Row
For x = 10 To sonsat3
If Cells(x, "E").Value = "Obstetrik US" _
Or Cells(x, "E").Value = "Obstetrik USG" _
Or Cells(x, "E").Value = "Suprapubik USG" _
Or Cells(x, "E").Value = "Suprapubik pelvik US" _
Or Cells(x, "E").Value = "Transvajinal USG" Then Cells(x, "O") = Cells(x, "G").Value / 34 * 17 Else Cells(x, "O") = Cells(x, "G").Value
Next x
For x = 10 To sonsat3
Cells(x, "P") = Evaluate("SumProduct((=D10:D" & sonsat3 & "=D" & x & "),O10:O" & sonsat3 & ") & ")
Next x
End Sub
