+ Reply to Thread
Results 1 to 3 of 3

Macro not returning correct value

  1. #1
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Macro not returning correct value

    Hello all

    I have a macro that should look at column 30. That value can be blank, be 0.00 or any number greater than zero. What I would like for it to do is if the cell in column 30 is greater than zero to pick up that value in move it to another sheet, if the cell is empty or = 0.00 then return the value found in column 3. Well if the value happens to be 0.00 it doesn't return value found on column 3, it still returns the value on column 30. Any ideas why?

    If the value is null, it returns the value on column 3 which is right.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: Macro not returning correct value

    Think I got it. I changed it to this:

    Please Login or Register  to view this content.
    and it seems to work just fine.

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Exclamation Re: Macro not returning correct value


    Hi !

    As a cell value can obviously not be equal to its text display like "0.00"
    so better is working with cell text instead of an array from values !
    As you can easily check your array data during the execution …

+ 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] How to fix macro not returning value to correct field?
    By AccountingJ in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-07-2017, 11:23 AM
  2. Returning Correct Data
    By financeVP in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2017, 04:04 AM
  3. [SOLVED] Countifs no returning the correct value
    By lizsantiago07 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-13-2017, 11:08 PM
  4. [SOLVED] SUMIFS Not Returning Correct Value
    By dankonstantinos in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-24-2015, 06:18 PM
  5. Formula sometimes returning correct answer and sometimes returning 0
    By redimp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2010, 06:28 AM
  6. [SOLVED] MAX Function not returning correct value
    By Phil in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-28-2006, 05:20 PM
  7. [SOLVED] Vlookup not returning correct value
    By Mandy Brookes in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-26-2005, 09:06 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