Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Help

Help

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Matthew Leggett
    wrote on last edited by
    #1

    Hi I have two locations referenced by point1 = A5 point2 = A10 I need to use these variables in a calculation ie =sum(point1:point2) however this doesn't work? when I use this statement ActiveCell.Offset(0, 3).Value = "=sum(point1:point2) any work around / solution? if you require additional info let me know?

    C C 2 Replies Last reply
    0
    • M Matthew Leggett

      Hi I have two locations referenced by point1 = A5 point2 = A10 I need to use these variables in a calculation ie =sum(point1:point2) however this doesn't work? when I use this statement ActiveCell.Offset(0, 3).Value = "=sum(point1:point2) any work around / solution? if you require additional info let me know?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Please don't ask twice. Please try to use intelligent headers. EVeryone here wants help. Please make it clear what you're asking about. Visual Basic.NET does not have any control which references locations by A5 and A10, or has an ActiveCell, It seems likely you're talking about Excel, but VBScript or interop ? How are we to tell ?

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      1 Reply Last reply
      0
      • M Matthew Leggett

        Hi I have two locations referenced by point1 = A5 point2 = A10 I need to use these variables in a calculation ie =sum(point1:point2) however this doesn't work? when I use this statement ActiveCell.Offset(0, 3).Value = "=sum(point1:point2) any work around / solution? if you require additional info let me know?

        C Offline
        C Offline
        ChandraRam
        wrote on last edited by
        #3

        Matthew Leggett wrote:

        I have two locations referenced by point1 = A5 point2 = A10 I need to use these variables in a calculation ie =sum(point1:point2) however this doesn't work? when I use this statement ActiveCell.Offset(0, 3).Value = "=sum(point1:point2) any work around / solution? if you require additional info let me know?

        Try this: ActiveCell.Offset(0, 3).Value = "=sum(" & Point1 & ":" & Point2 & ")" This is of course assuming that you have Point1 and Point2 declared as strings.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups