+ Reply to Thread
Results 1 to 2 of 2

Formula in VBA code is reversing values. How is this even possible?

  1. #1
    Registered User
    Join Date
    11-06-2014
    Location
    Alabama
    MS-Off Ver
    Office 365, Office 2013
    Posts
    26

    Formula in VBA code is reversing values. How is this even possible?

    I have the following code:

    Private Sub CheckBox275_Click()
    If CheckBox275 Then
    Sheets("01-01").Range("I52").Formula = "=Sum(D52:R6)"
    Else
    Range("I52").ClearContents
    End If
    End Sub


    When I check the box, a zero appears in I52. I was confused since there was data in D52 and R6. Then I clicked on I52 and the value says =sum(D6:R52). I went back and checked the code and it has it D52:R6. Why and/or how is it reversing this?

    Thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Formula in VBA code is reversing values. How is this even possible?

    It's the same range.

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Make a backward message by reversing the entire order of values in cell?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-16-2013, 11:11 PM
  2. Code for reversing print order
    By Paul Sheppard in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-15-2008, 12:03 PM
  3. Reversing Positive and Negative Values - Possible?
    By JennyW in forum Excel General
    Replies: 6
    Last Post: 10-03-2006, 05:43 PM
  4. Reversing the Order of Values in a List
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-28-2005, 11:26 AM
  5. [SOLVED] Reversing cell values
    By ac512 in forum Excel General
    Replies: 5
    Last Post: 04-13-2005, 08:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1