Quickly creating a summary differential sheet or linked output sheet - ignoring any blank cells

AID: 4003
  • Status: Published

7940 points

  • Bybrettdj
  • TypeTips/Tricks
  • Posted on2010-10-27 at 20:43:11
Awards
  • Community Pick
  • Experts Exchange Approved

Introduction


Most financial modellers will regularly need to build worksheets to either:
1) produce a "differential" sheet to show differences between two worksheets with an identical layout
2) create a "link" sheet that takes summary financial data from one WorkBook to another with live links

This is a simple process when dealing with a single contiguous data block.

For the first requirement a simple formula can be entered into the differential summary set and copied down and right to the same extent as the source data. The "link" sheet can be dealt with by copying the underlying data from Workbook 1, then using Edit - PasteSpecial and clicking on "PasteLinks".

The complication is that a typical model will have  a significant amount of blank rows and/or columns, which means that a copy down and right approach is likely to produce redundant calculations that will compare blank cells in (1), or link to empty cells in (2), leaving users with the choice of a manual tidy-up or leaving the redundant calcs in place.

This Article outlines a simple non VBA approach utilising SpecialCells to quickly build these summaries ignoring any blank cells.

Producing a Differential sheet


*Note, this approach does presume that the layout of the two worksheets to be compared is identical*

- Insert a new worksheet
- Copy and paste the used portion of one of the sheets being compared to the newly inserted differential sheet. This acts as a marker for the next step, plus it provides the formatting for the differential sheet
- Goto the inserted differential sheet
- Copy and paste the used portion of the first sheet back over itself as 'Values'.
Article-PasteSpecial-Value.png
  • 24 KB
  • LinksPaSpeVal
LinksPaSpeVal


Option A) indentifying text and cells that are different
- Select all the Cells, Press F5  ….. Special …. Constants  (which selects all non-blank cells)
Article-SelectConstants.png
  • 26 KB
  • SelConstant
SelConstant

- In the Formula Bar type a formula that refers to the top left cell in the two sheets to be compared (in the sample file, cell A4)
='2010'!A4<>'2009'!A4
And use "Ctrl & Enter" together to force this relative calculation into all the non-blank cells. Any cells that are different will evaluate to FALSE
Article-TrueFalse.png
  • 4 KB
  • TrueFalse
TrueFalse


Option B) comparing numerical cells only
- Select all the Cells, Press F5  ….. Special …. Constants  ..... tick 'Numbers' only (which selects all numerical cells)

- In the Formula Bar type a formula that refers to the top left cell in the two sheets to be compared
='2010'!F4-'2009'!F4
And again use "Ctrl & Enter" together to force this relative differential calculation into all the non-blank numerical cells
Note that any numerical cells used as titles - F4 is a date year in this example - will need to be manually changed to have more appropriate cell entries (for example F4 ins the screenshot below may be more suited as 'comparison of 2009 against 2010)


Producing a Linked sheet


- Insert a new sheet in the Target Workbook
- Copy and paste the used portion of the relevant sheet from the Source Workbook to the new sheet in the Target Workbook
- Copy and paste the used portion of the new sheet in the Target Workbook back over itself as 'Values'.
Article-PasteSpecial-Value.png
  • 24 KB
  • LinksPaSpeVal
LinksPaSpeVal

- Select all the Cells, Press F5  ….. Special …. Constants  (which selects all non-blank cells)
- In the Formula Bar type a formula that refers to the same cell in the Source Workbook
*Note that Excel will make this an absolute reference if you click in the Target Workbook (see screenshot) - remove the $ signs before the next step to make the reference relative. Pressing F4 twice will accomplish this*

 ='[EE Article.xls]2010'!A4
- Use "Ctrl & Enter" together to finalise the links back to the Source Workbook calculation into all the non-blank cells.
- In this example an additional step is required to copy the formatting from the Source Workbook back over the Target Workbook to ensure the number formats are as intended. As the date format from A4 will be inserted into the numbers in column F during the Ctrl & Enter step

Sample files


 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If you found the article helpful please click on the "YES" button after the question below.
This utility has been helpful to me and I hope you find an opportunity to use it as well.

If you didn't or otherwise want to vote No, please leave a comment and give me an
opportunity to respond. It will give me a chance to improve this article and others I
would like to write.

If you liked this article and want to see more from this author, please click here.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Asked On
    2010-10-27 at 20:43:11ID4003
    Tags
    Topic

    Microsoft Excel Spreadsheet Software

    Views
    1917

    Comments

    Expert Comment

    by: younghv on 2010-11-02 at 04:36:12ID: 21052

    Well written and easily understandable - thank you for putting this together.

    "Yes" vote above.

    Add your Comment

    Please Sign up or Log in to comment on this article.

    Join Experts Exchange Today

    Gain Access to all our Tech Resources

    Get personalized answers

    Ask unlimited questions

    Access Proven Solutions

    Search 3.2 million solutions

    Read In-Depth How-To Guides

    1000+ articles, demos, & tips

    Watch Step by Step Tutorials

    Learn direct from top tech pros

    And Much More!

    Your complete tech resource

    See Plans and Pricing

    30-day free trial. Register in 60 seconds.

    Loading Advertisement...

    Top MS Excel Experts

    1. dlmille

      1,351,499

      Genius

      10,680 points yesterday

      Profile
      Rank: Genius
    2. ssaqibh

      542,555

      Sage

      0 points yesterday

      Profile
      Rank: Genius
    3. rorya

      381,757

      Wizard

      4,225 points yesterday

      Profile
      Rank: Savant
    4. imnorie

      334,112

      Wizard

      0 points yesterday

      Profile
      Rank: Genius
    5. teylyn

      282,850

      Guru

      20 points yesterday

      Profile
      Rank: Genius
    6. barryhoudini

      280,460

      Guru

      0 points yesterday

      Profile
      Rank: Genius
    7. redmondb

      235,511

      Guru

      2,000 points yesterday

      Profile
      Rank: Sage
    8. matthewspatrick

      230,947

      Guru

      2,010 points yesterday

      Profile
      Rank: Savant
    9. byundt

      197,840

      Guru

      820 points yesterday

      Profile
      Rank: Savant
    10. zorvek

      144,626

      Master

      0 points yesterday

      Profile
      Rank: Savant
    11. StephenJR

      136,537

      Master

      0 points yesterday

      Profile
      Rank: Genius
    12. nutsch

      117,005

      Master

      0 points yesterday

      Profile
      Rank: Genius
    13. gowflow

      110,036

      Master

      0 points yesterday

      Profile
      Rank: Sage
    14. MartinLiss

      107,333

      Master

      0 points yesterday

      Profile
      Rank: Wizard
    15. GlennLRay

      95,652

      Master

      0 points yesterday

      Profile
      Rank: Guru
    16. robhenson

      90,250

      Master

      0 points yesterday

      Profile
      Rank: Sage
    17. ScriptAddict

      88,470

      Master

      0 points yesterday

      Profile
      Rank: Guru
    18. kgerb

      85,022

      Master

      0 points yesterday

      Profile
      Rank: Wizard
    19. aikimark

      84,456

      Master

      3,310 points yesterday

      Profile
      Rank: Genius
    20. andrewssd3

      80,242

      Master

      0 points yesterday

      Profile
      Rank: Wizard
    21. Wiesje

      69,918

      Master

      0 points yesterday

      Profile
      Rank: Master
    22. Shanan212

      66,418

      Master

      0 points yesterday

      Profile
      Rank: Master
    23. krishnakrkc

      59,548

      Master

      0 points yesterday

      Profile
      Rank: Wizard
    24. Michael74

      54,744

      Master

      0 points yesterday

      Profile
      Rank: Wizard
    25. regmigrant

      51,070

      Master

      0 points yesterday

      Profile
      Rank: Guru

    Hall Of Fame