+ Reply to Thread
Results 1 to 4 of 4

VBA Cell Value is equal to value of a cell with a formula

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2010
    Posts
    62

    VBA Cell Value is equal to value of a cell with a formula

    Hi all,

    Quick question, I have a VBA that loops through worksheets and based on a condition adds a new worksheet and copies and pastes a few values. However, the calling of the values to a new cell is not working and I'm not sure why. Could it be because the Range value is actually a formula (I want just the value to appear in the new worksheet)? The following is what is not working;

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Should I replace the top code with a specific copy and paste special?

    Any help would be appreciated, I hope this is enough information for someone to tell me what is going on.


    Thank You!

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,192

    Re: VBA Cell Value is equal to value of a cell with a formula

    even if its a formula, it will resolve to the value.
    the only way to see the formula is range(xxx).formula

    you can put a break line (F9) on a code line, then when it stops, hover the cursor over it and it will tell the value.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA Cell Value is equal to value of a cell with a formula

    Are you properly identifying the worksheet on both sides of the equation.

    e.g. Worksheet.Cells.Value = Worksheet.Range.Value

  4. #4
    Registered User
    Join Date
    01-10-2012
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: VBA Cell Value is equal to value of a cell with a formula

    Ranman,

    Thanks for the tip, I should have done that before. Turns out the correct values were there but a 2nd part of the code was deleting what was there.

    I appreciate your input!

+ 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. Replies: 6
    Last Post: 10-03-2014, 12:18 PM
  2. Looking for a formula- if a cell is blank, it is equal to the cell next to it
    By cedricmsmith in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-05-2014, 11:52 AM
  3. FORMULA HELP - If Cell Equal Another Cell, Return value next to that cell
    By scoochUM in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-22-2014, 10:09 PM
  4. [SOLVED] how to do "if formula for cell to equal cell when < or = another cell
    By zydecodog in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 08-01-2013, 08:49 AM
  5. Formula to equal next cell below with value if cell below is blank
    By EoghanMBH in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2012, 12:57 AM
  6. Make Cell equal to result of other cell formula
    By Davo in forum Excel General
    Replies: 1
    Last Post: 08-12-2011, 06:57 PM
  7. when is equal not equal - cell reference results to blank cell
    By riwiseuse in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2009, 09:44 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