Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

524
Views
How to create a counter in Excel online (Excel 365)

I know to use Active X and buttons to create a counter that when clicked increments by 1 in normal Excel easily enough but excel 365(online) doesn't allow for buttons. Any idea how to create a counter in Excel online?

So I found this bit of code but I don't know Javascript. Anybody know enough that can be of help?

Public xRgS, xRgD As Range
Public xNum As Long
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    On Error Resume Next
    If Target.Cells.Count > 1 Then Exit Sub
    Set xRgS = Range("E2")
    If xRgS Is Nothing Then Exit Sub
    Set xRgD = Range("H2")
    If xRgD Is Nothing Then Exit Sub
    If Intersect(xRgS, Target) Is Nothing Then Exit Sub
    xNum = xNum + 1
    xRgD.Value = xNum
End Sub

It just keeps track of everytime you click inside a cell.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There are two possible ways for O365 on the web:

  • Create a web add-in where you can develop a custom UI (it can be a task pane) with a counter, see Build an Excel task pane add-in.
  • Use Office scripts, see https://docs.microsoft.com/en-us/office/dev/scripts/resources/vba-differences for more information.

I suppose web add-ins is the right choice for a custom UI (a task pane).

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!