Link to home
Start Free TrialLog in
Avatar of Bill Golden
Bill GoldenFlag for United States of America

asked on

Excel Spreadsheet Formula - BROKEN INTO 2 QUESTIONS!

I have a multi-tabed Excel Spreadsheet Report.  Each Page contains a Page Number in the following format:
                           - 12 -
The reports begin with Tab2.  The first page of Tab2 reports (generally two pages long) gets it page number from a user supplied entry on Tab1.
If the user supplied value in cell D53 of Tab1 contains the number 3, this formula, in B69 of Tab2
                       ="- "&(Tab1!$D$53)&" -"
Yields the following results:
                       - 3 -
If want cell B144 of Tab2 to increment this number by 1.
If the Tab2 report is three pages long, there could be a value in B217!  If so, I would want the resulting value in B217 incremented by 1.
I cannot do this with VBA.  That is beyond my expertise.
Avatar of Danny Child
Danny Child
Flag of United Kingdom of Great Britain and Northern Ireland image

If you can post an example of what you have so far, that would be helpful.

I'd suggest an alternative way of generating the layout you want.  Instead of using a formula, use a Custom Format for those cells of
" - "0" - "

Copy the line above, in bold
To apply this, highlight the cells in question, and then press CTRL + 1
This is the shorcut for the Number Format dialog box.  Select Custom from the Category List, and paste in the line above, just below where it says Type:

The advantage of this is that the numbers stay as numbers, and it's easier to change their values later.
OK, I'm not following your explanation totally, but here's what I think it means.

You want one sheet (Tab 2, col B) to check for numbers in another sheet (Tab 1, col D), and to increase the count by one for every page it goes down.

I've cobbled something together here, hope it's useful?
ee-Custom-Formats-and-page-numbers.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Danny Child
Danny Child
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bill Golden

ASKER

Excellent solution.  Building on that solution to accomplish another task.
Glad it helped, let us know if more explanation needed.