Consulting

Results 1 to 18 of 18

Thread: Solved: A better method?

  1. #1
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location

    Solved: A better method?

    Given that workbooks can become quite complex, it it better practise to breakdown workbooks into groups of sheets that have a direct relationship to one another and allow reference to other workbooks?

    I'm assuming that the benefits here are quicker to load, less memory intensive, and possibly easier to maintain.

    Is there a general opinion about a reasonable size to a workbook/ worksheet?

    And... does referencing a closed workbook cause many problems?

    Ted

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Ted,
    If you need this structure, I think you need a Database!
    Regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    LOL. YOu are keen toget me into Access, Malcolm

  4. #4
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Quote Originally Posted by Aussiebear
    LOL. YOu are keen toget me into Access, Malcolm
    Not really, just keeping your mind open to the possibility! Size of workbook is not a problem. The one I'm currently working on is 18Mb, but it's not too Relational, and need a different functionality. If you're record keeping, as opposed to mainly calculating, that is when the use really changes.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quote Originally Posted by Aussiebear
    Given that workbooks can become quite complex, it it better practise to breakdown workbooks into groups of sheets that have a direct relationship to one another and allow reference to other workbooks?

    I'm assuming that the benefits here ... easier to maintain.
    Not in my mind. We have a budgeting deal here that has been segregated into several workbooks. (It was not designed by me.) It is the most cumbersome thing to maintain, as there are links everywhere. If you want to change something in one, you need to check all the others to make sure they were unaffected.

    I'm not saying that the design on our was bad, but I wouldn't approach things as thinking this will make it easier to maintain. The fact is that to me, it usually makes it harder. Things aren't in one place anymore.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  6. #6
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Thank you Ken. I shall bear your advice in mind.

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Ken's advice is very sage, but I would just add that if you are going to use Excel for the data, it is a good idea to separate the data and logic (code) into separate workbooks, maybe using an XLA.

  8. #8
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Bob, you are out to confuse me!

  9. #9
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    No, I am trying to help, honest!

    What did I say that is confusing you?

  10. #10
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    LOL!

    I agree with Bob. Basically what he's saying is that if you are using code to manipulate your data in any way, it's sometimes best to hold all your code in an Excel Add-in (XLA). This means that you can easily port it a different data set.

    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  11. #11
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Ken, Bob's XLA bit. I'm in over my head just with VBA let alone building and adding an XLA.

  12. #12
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Bob, It doesn't take much to confuse me. 12 months ago I didn't know vba even existed, then one day something clicked and its a whole new ball game out there.

    Just in the last couple of days, I was asked at work if I could come up with a better method of recording timesheets and some of the subsequent calculations that arise from this data. Given Malcolm's earlier advice, now I'm torn between record keeping (Access) and Calculations (Excel).

    And just for the record... I am tryng to dodge the Access bit... for now. (Sad case aren't I?)

  13. #13
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by Aussiebear
    Bob, It doesn't take much to confuse me. 12 months ago I didn't know vba even existed, then one day something clicked and its a whole new ball game out there.

    Just in the last couple of days, I was asked at work if I could come up with a better method of recording timesheets and some of the subsequent calculations that arise from this data. Given Malcolm's earlier advice, now I'm torn between record keeping (Access) and Calculations (Excel).

    And just for the record... I am tryng to dodge the Access bit... for now. (Sad case aren't I?)
    Personally, my opinion is that Access is a waste of time for timesheets. I would create a timesheet template, and and basically just use formulae. If you need VBA then either bind it into the timesheet template, or create an xla (probably overkill for timesheets).

  14. #14
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Totally agree with Bob.

    The nice thing about going the template route is that you can always add the XLA later if you need to. As your coding skills become better, you will take that plunge.

    Templates are a wonderful utility in Excel though. And for timesheets, they are perfectly suited.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  15. #15
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    But if I wanted to record timesheets for a number of employees, apart from some calculations, is this not a record keeping function?

    I have started a new thread in relation to this issue and attached an example of what I have been asked to do.

  16. #16
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Ted,
    Your talk of complex workbooks and relationships made me suggest Access. For recording timesheets, I agree that Excel templates will serve, and that's what I made up for my office staff. I did however create an export module to write the data to a database for analysis.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  17. #17

    How to separate code and data

    Quote Originally Posted by Ken Puls View Post
    LOL!

    I agree with Bob. Basically what he's saying is that if you are using code to manipulate your data in any way, it's sometimes best to hold all your code in an Excel Add-in (XLA). This means that you can easily port it a different data set.
    Yes, I agree too! I think it makes maintaining much easier and, above all, distributing new versions to users a breeze...
    What advice and recommendation would you give to achieve a development with this goal in mind?

    Thank you for your help!

  18. #18
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I don't understand, f you agree with Ken and me, that suggests that you understand the approach, so what advice are you seeking?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •