0% found this document useful (0 votes)
2 views1 page

Counting

The document contains VBA code for Excel that defines several functions and subroutines. It includes functions to get and set cell values, find the last row in a column, create and copy a new sheet, and count occurrences of values in a specific column. The code is designed to manipulate Excel worksheets and perform operations based on the data within them.

Uploaded by

040601is
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Counting

The document contains VBA code for Excel that defines several functions and subroutines. It includes functions to get and set cell values, find the last row in a column, create and copy a new sheet, and count occurrences of values in a specific column. The code is designed to manipulate Excel worksheets and perform operations based on the data within them.

Uploaded by

040601is
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Function getValue(sht, i, j)

getValue = Worksheets(sht).Cells(i, j).Value

End Function

Sub setValue(sht, i, j, target)


Worksheets(sht).Cells(i, j) = target

End Sub

Sub AddSheet(sname)
Sheets.Add.Name = sname

End Sub

Function FindLastRow(wksh, col)


FindLastRow = Worksheets(wksh).Cells(Rows.Count, col).End(xlUp).Row

End Function

Sub CreateANDCopy()

Sheets.Add after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = "Sheet0"

Sheets("Sheet0").Columns(1).Value =
Sheets("2_LIC_R_Licencee_ESer_2").Columns(2).Value
Sheets("Sheet0").Rows(1).EntireRow.Delete

End Sub

Sub CountEService()

lastrowB = FindLastRow("Sheet0", "B")


Dim efftotal As Integer
efftotal = 0

For i = 1 To lastrowB
Var = Application.Match(Worksheets("Sheet0").Cells(i, 2).Value,
Worksheets("Sheet0").Columns(1), 0)

If Not IsError(Var) Then


efftotal = efftotal + 1

End If

Next i

MsgBox (efftotal)

End Sub

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy