Post Tagged makro

EXCEL MAKRO FOR IF ENDIF

Saturday, 07 July 2011

Sub HESAPLA()
Dim TOPLAM As Double
Sayfa1.Range("B4:P15").Value = ""
For SUTUNR = 1 To 15
SATIR = 4
ONCEKI = 1
TOPLAM = 0
sutun = Chr(65 + SUTUNR)
For i = 17 To 381
AHUCRE = "A" & i
ALTHUCRE = "A" & i + 1
BHUCRE = sutun & i
If Sayfa1.Range(AHUCRE).Value = "" Then
Exit For
End If
AY = Month(Sayfa1.Range(AHUCRE).Value)
If AY = ONCEKI Then
TOPLAM = TOPLAM + Sayfa1.Range(BHUCRE).Value
Sayfa1.Range(sutun & SATIR).Value = TOPLAM
Else:
Sayfa1.Range(sutun & SATIR).Value = TOPLAM
SATIR = SATIR + 1
ONCEKI = AY
TOPLAM = Sayfa1.Range(BHUCRE).Value
End If

Next i
Next SUTUNR
End Sub


NETSİS BÜYÜK ALIŞ BÜYÜK SATIŞ İÇİN EXCEL MAKRO

Saturday, 07 July 2011

Netsis’te Fatura modülünde “Fatura / İrsaliye İcmali” penceresinden raporlayıp Excel formatında kaydedin. Oluşturduğunuz Excel dosyasını açıp Visual Basic bölümünü açın aşağıdaki kodu kopyalayıp yapıştırın ve çalıştırın.


Attribute VB_Name = "Module1"
Sub liste()
belge = 0
firma = ""
toplam = 0
Cells(1, 1).Select
For i = 2 To 10000
Cells(i, 1).Select
If ActiveCell.Value = "" Then
Cells(i - 1, 4).Select
firma = ActiveCell.Value
Cells(i, 14).Select
toplam = ActiveCell.Value
Cells(i + 1, 1).Select
belge = ActiveCell.ValueIf toplam >= 5000 Then
Cells(i, 18).Select
ActiveCell.Value = firma
Cells(i, 19).Select
ActiveCell.Value = belge
Cells(i, 20).Select
ActiveCell.Value = toplam
End If
End If
Next i
liste2
End Sub

Sub liste2()
belge2 = 0
firma2 = ""
toplam2 = 0
sira = 1

Cells(1, 18).Select

For s = 1 To 10000

Cells(s, 18).Select
If ActiveCell.Value <> "" Then
firma2 = ActiveCell.Value
Cells(s, 19).Select
belge2 = ActiveCell.Value
Cells(s, 20).Select
toplam2 = ActiveCell.Value

Cells(sira, 21).Select
ActiveCell.Value = firma2
Cells(sira, 22).Select
ActiveCell.Value = belge2
Cells(sira, 23).Select
ActiveCell.Value = toplam2
sira = sira + 1
End If

Next s
End Sub


  • "I am a dreamer. Seriously, I'm living on another planet."
  • Lütfü Hoca

  • Categories

  • Archives