+ Reply to Thread
Results 1 to 3 of 3

VBA reading a cell and giving different value than what is in the cell

  1. #1
    Registered User
    Join Date
    05-15-2021
    Location
    Ireland
    MS-Off Ver
    2021
    Posts
    17

    VBA reading a cell and giving different value than what is in the cell

    Hi folks. I've come across a strange problem and I need some help. I'm new to VBA coding but most problems I can work out logically. This, however, seems to just be an error and my coding seems correct.

    I have a list (on page called "Last Calcs"), that list is imported to "Final Page" and put in descending order (by 'rank') allowing me to see what 'coin' preforms the best (these are a series or other calculations throughout the sheet, its a sheet for tracking Cryptocurrencies). This is the formulae I use: =SORTBY('LAST CALCS'!$H$3:'LAST CALCS'!$L$14,'LAST CALCS'!$H$3:'LAST CALCS'!$H$14,-1)

    So, on the two sheets each coin is followed by a command (Hold, Sell, Buy, Stablecoin). My problem is that the sheets are saying one thing but VBA reads another and acts accordingly (as in quite literally its reading 'hold' as 'sell' and I don't know why!). I've even gone so far as to have VBA read the cell, write it to another cell and compare the two, which it declares as 'FALSE' (or not equal)

    Any help would be MOST appreciated! Usually I can spot bad logic or a typo, for the most part this works, but once in a while its just wrong and I don't know why!
    Attached Images Attached Images

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA reading a cell and giving different value than what is in the cell

    You are asking us to solve a VBA problem without showing us the VBA with the problem. Also, you could also have an issue in the data, which can't be determined by looking at a screen shot.

    Please attach your actual file, see yellow banner at the top of the page.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-15-2021
    Location
    Ireland
    MS-Off Ver
    2021
    Posts
    17

    Re: VBA reading a cell and giving different value than what is in the cell

    Its the outputs that are the problem, not the code per se, the cell says one thing and VBA is reading another.

    I'll post the file and a splurb on what's going on...

+ 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] CHECKSUM Formula in three months giving false reading in one of them
    By Ochimus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-04-2019, 11:18 PM
  2. Matrix Style Reading: Reading from one cell to cause change in another cell
    By snkhan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2019, 01:52 AM
  3. [SOLVED] Cells not reading as numbers when average is used. Giving #VALUE! error.
    By greenfox74 in forum Excel General
    Replies: 4
    Last Post: 02-18-2018, 03:22 AM
  4. Comparing two Cell containing Number and giving the difference in third cell
    By aabhi2251 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-22-2014, 10:34 AM
  5. Replies: 1
    Last Post: 03-05-2012, 04:28 PM
  6. Reading/lookup Data from excel by giving a querry
    By helloexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2008, 07:13 PM
  7. Reading excel data cell by cell in C#
    By Shilpa in forum Excel General
    Replies: 0
    Last Post: 07-04-2006, 05:25 AM

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