+ Reply to Thread
Results 1 to 6 of 6

Convert Specific Cells to Values

  1. #1
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    856

    Convert Specific Cells to Values

    I want to be able to convert all formulas to values except for various total lines.

    Is there a way to do that without looping cell by cell? I can do it with a loop, but if I try to use a With statement it seems much faster, but it converts everything.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Convert Specific Cells to Values

    I don't know the layout of your data. It may be faster to convert all formulas to values and then re-establish the SUM formulas. Where are the sum formulas located?

    If the totals are all at say the bottom of each column, it would be easy to exclude them from the conversion. This example excludes the last row...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    856

    Re: Convert Specific Cells to Values

    Unfortunately, the totals will be scattered around the worksheet. Essentially taking a set of Financial Statements where I have totals and subtotals for Revenue, Expenses, Difference columns, etc for an Income Statement, Balance Sheet and other reports.

    I can do it with the loop, just trying to find a faster way.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,996

    Re: Convert Specific Cells to Values

    You'll have to loop, unless there is some pattern to the locations of the totals. You can load all the formulas into an array, process that and then put them back which should be faster than replacing cell by cell.
    Everyone who confuses correlation and causation ends up dead.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Convert Specific Cells to Values

    This would loop through only the cells with formulas and exclude blanks and constants in the loop.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,261

    Re: Convert Specific Cells to Values

    Another variant:
    Please Login or Register  to view this content.

+ 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. Insert multiple pictures from specific cell values in specific cells
    By Jenskies in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-16-2018, 11:53 AM
  2. vba - convert formulas to values when specific criteria is met
    By bslinden394 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2017, 10:25 PM
  3. Convert Text Values to Specific Numeric Values
    By lmp101010 in forum Excel General
    Replies: 5
    Last Post: 09-06-2014, 04:00 PM
  4. Replies: 6
    Last Post: 05-14-2014, 04:56 PM
  5. [SOLVED] Convert 3 cells to one cell with specific format
    By severet93 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2014, 08:37 AM
  6. Need to use/convert values in specific range as/to an array
    By s4driver in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-18-2013, 06:46 AM
  7. Convert formulas to values for specific rows
    By Mike361 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-24-2012, 02:25 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