+ Reply to Thread
Results 1 to 7 of 7

Reading cell value not formula on IF statement

  1. #1
    Registered User
    Join Date
    11-24-2014
    Location
    London
    MS-Off Ver
    Excel Mac 2011, V14.4.1 (140326) Upd: 14.4.1
    Posts
    20

    Reading cell value not formula on IF statement

    Hi all,

    Struggling to find a solution on this. I have a worksheet that pulls a value from another sheet (which is a variable dropdown list), I then have the following code that performs an IF statement to display additional information in another column.

    The code isn't working because its reading the formula not the value.

    Any help would be greatly appreciated.

    worksheet:

    Please Login or Register  to view this content.
    Module:

    Please Login or Register  to view this content.
    my best guess is on this line

    Please Login or Register  to view this content.
    I need to tell it to look at cell value but to apply the logic to the whole range

    Thanks

    Matt

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Reading cell value not formula on IF statement

    Are you able to upload the workbook?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    11-24-2014
    Location
    London
    MS-Off Ver
    Excel Mac 2011, V14.4.1 (140326) Upd: 14.4.1
    Posts
    20

    Re: Reading cell value not formula on IF statement

    Thanks Richard

    Example workbook link:

    https://www.dropbox.com/s/vg84fp7fvq...ample.xls?dl=0

    Code is regarding 'PLANNING REF' worksheet. it should read the value in column D and return a value in column I.

    The code works when I type the value in, but currently its reading the formula.

    Thanks

    Matt

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Reading cell value not formula on IF statement

    Would you upload the file to this forum please. Many of us prefer not to visit file hosting sites of unknown provenance

  5. #5
    Registered User
    Join Date
    11-24-2014
    Location
    London
    MS-Off Ver
    Excel Mac 2011, V14.4.1 (140326) Upd: 14.4.1
    Posts
    20

    Re: Reading cell value not formula on IF statement

    Apologies.

    Should be attached now.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Reading cell value not formula on IF statement

    The Sheet change event doesn't react to a change in a formula value, only a change made by the user.

    I'm not entirely sure how you operate this workbook but maybe put your sheet change code in the Production QC Form sheet.

  7. #7
    Registered User
    Join Date
    11-24-2014
    Location
    London
    MS-Off Ver
    Excel Mac 2011, V14.4.1 (140326) Upd: 14.4.1
    Posts
    20

    Re: Reading cell value not formula on IF statement

    i've still been trying to get this to work to avail.

    I've dropped the current code, attempted code and copy of a more consolidated workbook. Any pointers would be greatly appreciated.

    To Reiterate, I have a set of values that are available via a validated dropdown menu in Sheet 3, Column D. Once selected this value currently displays in a different sheet (Sheet 7) using excel function ='Sheet 3'!D4 and so on, and I have some code that reads this and performs an IF statement to produce a value in another cell.

    My problem is the code is dependant on reading the value and not the formula.

    I currently have a worksheet change command for a separate function I want to run, is there a way for this to run a second function and call any changes from sheet 3 column D into sheet 8 column D and then run my other change function?

    Sheet 7 Code:

    Please Login or Register  to view this content.
    Sheet 7 Module:

    Please Login or Register  to view this content.
    I've been trying this route but to no avail:

    Worksheet 3 code:

    Please Login or Register  to view this content.
    Module:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mattcass87; 02-09-2017 at 08:27 AM.

+ 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. If statement reading blanks
    By Prince Dakkar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-17-2016, 01:20 PM
  2. Macro for reading out references from statement
    By rodeam in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2016, 11:48 AM
  3. cell not reading formula via vlookup
    By swfarm in forum Excel General
    Replies: 2
    Last Post: 03-27-2014, 03:59 PM
  4. [SOLVED] IF Statement Reading Zero's
    By Waycool86 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-28-2013, 01:41 PM
  5. If statement reading incorrectly
    By LifeMeansChange in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-01-2013, 09:56 AM
  6. [SOLVED] Formula Not Reading Cell Data Correctly
    By swordswinger710 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-08-2012, 04:19 PM
  7. [SOLVED] Simple +formula not reading value from the reference cell
    By Richard Buttrey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-06-2005, 05:05 PM

Tags for this Thread

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