Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9206175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:07:13+00:00 2026-06-18T00:07:13+00:00

Okay basically I’ve got a sales managing system that lists all the comics for

  • 0

Okay basically I’ve got a sales managing system that lists all the comics for sale, I’m trying to add a way to add another comic into it. It’s going fine but I need to update the formulaes that show the totals and such which I’ve tried with the code below but It’s throwing a object required error when I try to set my cellnum to the row number returned by my search.

Dim cellnum As Integer
Set cellnum = range("B4:B500").Find("TOTALS").Row

Dim cellnum_minus As Integer
Set cellnum_minus = cellnum - 1

Dim cellnum_plus As Integer
Set cellnum_plus = cellnum + 1

range("O" & cellnum).Value = "=SUM(O4:O" & cellnum_minus & ")"
range("Q" & cellnum).Value = "=AVERAGE(O4:O" & cellnum_minus & ")"
range("R" & cellnum).Value = "=MAX(R4:R" & cellnum_minus & ")"
range("S" & cellnum).Value = "=MIN(S4:S" & cellnum_minus & ")"
range("C" & cellnum_plus).Value = "=C" & cellnum & "/10"
range("D" & cellnum_plus).Value = "=D" & cellnum & "/10"
range("E" & cellnum_plus).Value = "=E" & cellnum & "/10"
range("F" & cellnum_plus).Value = "=F" & cellnum & "/10"
range("G" & cellnum_plus).Value = "=G" & cellnum & "/10"
range("H" & cellnum_plus).Value = "=H" & cellnum & "/10"
range("I" & cellnum_plus).Value = "=I" & cellnum & "/10"
range("J" & cellnum_plus).Value = "=J" & cellnum & "/10"
range("K" & cellnum_plus).Value = "=K" & cellnum & "/10"
range("L" & cellnum_plus).Value = "=L" & cellnum & "/10"
range("M" & cellnum_plus).Value = "=M" & cellnum & "/10"
range("N" & cellnum_plus).Value = "=N" & cellnum & "/10"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:07:14+00:00Added an answer on June 18, 2026 at 12:07 am

    You do not use “set” when assigning a variable a value. Set is used to assign a reference to an object, like if you wanted to take a Range object and assign it. Like Set myRange = Range("A1:B2").

    Wrong

    Dim cellnum As Integer
    Set cellnum = range("B4:B500").Find("TOTALS").Row
    

    Correct

    Dim cellnum As Long
    cellnum = range("B4:B500").Find("TOTALS").Row
    

    Also, use Long instead of Integer. VBA will convert Ints to Longs anyway, plus you avoid errors where you need to store a larger number.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

 Okay, so emoji basically shows the above on a computer. Is that another
Okay, Ive got a cog (toothed gear) that I have drawn in opengl. I
Okay so basically i'm trying to submit a form with some javascript arrays. I
Okay, basically, I have formed a mySQL query which returns a data set all
Okay, so for all i know a string is basically an array of characters.
Okay basically I am creating a stored procedure that will return data for our
Okay so I'm basically trying to let the user decide which drive they would
Okay, got a question. I have assembled a bit mask for options. Basically my
Okay so basically I've got a form where you enter items you want to
Okay, I know that there are many question about it, but they are all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.