+ Reply to Thread
Results 1 to 11 of 11

Transferring Data from many sheets to a single sheet

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    India
    Posts
    118

    Transferring Data from many sheets to a single sheet

    Hey!
    I'm loving these new formulas that i'm learning here and applying them to whatever sheets i come across to make my life easier at work...

    So now i've created another worksheet, this one is to help my colleague who wastes atleast an hour everyday to generate a consolidated report of our bank accounts...

    Now i've sorted out half of the report where he can give an overview of the position of cash flow on a daily basis.

    Theres however 1 more addition i wanted to make to make this workbook absolutely perfect!

    On sheet 2 (which is my consolidated report sheet) I want to add all the transactions that occur on a particular date from all the different bank accounts (Each account having a seperate worksheet)

    I'm not sure if advanced filters can achieve this or not or even easier/short macros... Any tips/hints as to how i can achieve this would be awsome..

    I've attached a sample workbook which has sheet1 for a bank account and sheet2 for report generation...

    I want to add all the rows having "Clearing date" (column A) in Sheet1 to report date in Sheet2
    ..And this for all the account sheets i can add...

    Thanks For all the help!

    Regards

    Mohit
    Attached Files Attached Files
    Last edited by mohitspamz; 09-23-2009 at 01:10 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transferring Data from many sheets to a single sheet

    It would be helpful to have a sample sheet with
    1) More than one "data" sheet (you did say there would be many individual sheets)
    2) Sheetnames more likely to match what your real sheetnames are
    3) A set of sample "results" on the Consolidated sheet...make sure it's clear WHERE you want automation to occur.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    12-02-2008
    Location
    India
    Posts
    118

    Re: Transferring Data from many sheets to a single sheet

    Hey!
    Firstly thanks for the reply!

    I'll work on the sample and upload a more accurate worksheet... i just thought a crude sample might be enough to get things started, my bad for taking things for granted... Its 1:20 am right now, and i gotta work early tomorrow, so i'll try and upload it as soon as i can tomorrow morning...

    As this is my bank book, all the indivdual data sheets are basically bank statements of particular accounts.. we have 11-13 accounts in all, sheet names would be ICICI1476, ICICI2685, Citi6018.... i thought i cud adapt and manage the additional sheets once i get the way out conceptually....

    Data formats for all these individual sheets would be exactly the same as sheet1...(all are bank statements)

    And for results now that I realise it, I should have copy pasted the results in the format I want it to appear... So sorry about it! I really messed up! (Considering that was what I was looking forward to get help on!)

    Thanks Again for replying!

    Regards

    Mohit

  4. #4
    Forum Contributor
    Join Date
    12-02-2008
    Location
    India
    Posts
    118

    Re: Transferring Data from many sheets to a single sheet

    Ok so i've updated my workbook to include the exact no. of worksheets i'll be working on with their exact names. However, havent really added any data after 2 sheets...

    Also i realised that there are actually 17 accounts that we have to track! So thats quite alot of no. of sheets... however, the records that would match a particular day could range from 0 entries to 20 entries on a good active day... (but i wud not want a limit on that, cuz its really uncertain)

    I'm hoping this updated worksheet cud provide a good base to get started. If theres anything that i missed out please let me know to fill it in...

    Thanks Again for all the time and help

    Regards

    Mohit
    Attached Files Attached Files

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transferring Data from many sheets to a single sheet

    Mohit,

    Attached is your sheet with a macro in it called DatedReport. If you make a change to cell G1, the DatedReport macro is run automatically for you.

    I had to change the title of the sheet Kotak 811 because it wasn't an exact match for the text strings in the A/C details section. Make sure those stay in sync.

    For the curious, here's the code...
    In the Sheet module "Report":
    Please Login or Register  to view this content.
    And in a regular Module1:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    12-02-2008
    Location
    India
    Posts
    118

    Re: Transferring Data from many sheets to a single sheet

    Sir,
    That is beautiful! Thanks alot for ur time and effort!
    I'll take this with my accountant colleague and let him check if everything is going right for him in this workbook... and get back if there r any changes that we might have....

    Hey can you suggest how do i start learning basic vb language?

    Thanks again!

    Regards

    Mohit

  7. #7
    Forum Contributor
    Join Date
    12-02-2008
    Location
    India
    Posts
    118

    Re: Transferring Data from many sheets to a single sheet

    Hey!
    So i got my accountant colleague to transfer all the data and check if everything works fine and we encountered 2 problems; 1 macro based and the other formula based... and surprisingly i could sort out the issue with macro which btw if i look back at it now wasnt really a macro issue but a formatting issue, but still cant get hold of the correct approach to sort out the formula based issue.

    Actually, on a given day if there are no transactions in a given A/c the "consolidated report generates a N/A error However, i want it to show the balance after the last transaction before the report date.
    So if there are no transactions on 5th,6th,7th and i'm generating a report of 7th i require it to show me the final balance of 4th. I tried different formulas to get the desired result but cudnt manage. So here i am once again asking for ur kind help...

    the variations of the formulas i tried:

    Please Login or Register  to view this content.
    All these formulas to be entered in B4 in Report Sheet. Workbook sample is the same as wot Sir JBeaucaire posted earlier.

    @JBeaucaire
    Btw, the date format was causing the report to not be generated for first 9 days of the month because of the format of the date.. my data has the date format set as "DD-MMM-YY" so to match yours i converted into "DD-MMM" but still on first 9 days the date wud still come out as "D-MMM" which did not allow the filtering to take place.

    Thanks Again

    Regards

    Mohit

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transferring Data from many sheets to a single sheet

    Let's help the formulas test to see what's going on in those other sheets prior to pulling any data. In the attached sheet, I've added a helper column in column K and beefed up the formula so they will use the names of the sheets in column A, allowing you to create one set of formulas on row 4 and copy them down.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    12-02-2008
    Location
    India
    Posts
    118

    Re: Transferring Data from many sheets to a single sheet

    Sir!
    I dont any idea wotsoever of wots going on in that formula!
    I'd taken about 30-40 minutes to setup the formulas (finding and replacing sheet names in a separate word doc) for my data workbook and other basic formatting and stuff to start working on it and now i'd really feel like a lousy idiot if i dont use ur formula just for the effort u took to even write that down!

    Note to self: Do pilot runs and check and recheck wot could possibly go wrong before implementing something new i dont really have a clue about on full scale..

    I feel really ashamed to ask this but could just gimme the part where i can just get the lookup thing sorted out so to not to have everything all over again... hope ur not offended or nething by this.

    Thanks for everything!

    Regards

    Mohit

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transferring Data from many sheets to a single sheet

    The INDIRECT() formula takes some getting used to read it. It's a fun way to "piece together" parts of a reference, THEN use the reference in a regular formula. I am so used to it I forget how boggling it appears to be. Sorry about that.

    The benefit of the INDIRECT() is that it let's you use the text strings in the A/C column to build the reference the sheet it should use, then when you get all the formulas across the first row working, you can just copy them down and they will work for all the appropriate sheets.

    Of course, you do not have to use it, the formulas you had that directly reference the sheets is perfectly fine, too. It's just hard to make changes or reorder your table.

    ==========
    I'm not sure I understand if you are asking another question or not?

  11. #11
    Forum Contributor
    Join Date
    12-02-2008
    Location
    India
    Posts
    118

    Re: Transferring Data from many sheets to a single sheet

    Yes! Sorry for the vague rants in my previous post, i was really tired and it was late in the evening and i didnt even recheck if i'd written complete sentences or not...

    I meant if u cud just isolate wots wrong with my lookup formula and intended to ask u help me edit it....or editing your formula without using the indirect function to setup my sheet and make the lookup work perfectly?

    I tried breaking down your code back then but i got lost when the indirect function came in last evening.. :S
    But once i got some sleep and got my senses back this morning i managed to break it up and realised i just had to add another lookup criteria of the result being greater than 0 and once i reach office i'll give a crack at it...

    Thanks Again for ur wonderful help!

    Regards
    Mohit

    PS: I think this thread would now be finally Officially SOLVED! :P

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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