+ Reply to Thread
Results 1 to 30 of 30

Generating reports based on conditions

  1. #1
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Generating reports based on conditions

    Hi All,

    Please find the attached sample file..

    I'm trying to generate some reports or filtering of data based on conditions,when i select from the drop down menu
    from the validation list,(G6:I6),i need to know whether is it possible to generate it on a new work sheet which i could
    view or print and then close it with/out saving.

    conditions for the reports: If category field is there (say like tyres) and the other two fields are empty (H6 & I6)then it should populate all the datas based on tyres and if H6 is "Bridgestone" then it should narrow it down to the two conditions,if I6 is "In Stock"or any other terms it should
    narrow down the datas which meet the three conditions..

    From the other side also if i select only "I6 or h6 " then it should populate all relevant data, with the other two conditions being nil..

    Any solutions..

    Thanks,
    Ak
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    No suggestions,please help

  3. #3
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Office 365
    Posts
    1,899

    Re: Generating reports based on conditions

    @ akbar ,
    HI need following Information
    1) Which data should be used to generate table
    2) Are u looking to generate "Inventory" sheet from "setting"
    3) looking to generate a new sheet based on both 'Inventory & Setting "Sheet
    Punnam

  4. #4
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Hi Punnam thanks for your response..

    Please find the attached snap shot,it could give you a better idea than my language skill,

    i have given a green shade for the results i'm looking for..

    Thanks,
    Ak
    Attached Images Attached Images

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    Please find the attached sheet and click on Green Button on the sheet to see if you get the desired output in a new workbook which you can close after viewing or taking the print out.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  6. #6
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Office 365
    Posts
    1,899

    Re: Generating reports based on conditions

    Hi,
    I feel it is better to go with VBA as suggested by Sktneer .

    Punnam

  7. #7
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Thanks Guys,that's what exactly i was looking for..

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    You're welcome. Thanks for the feedback.
    If that takes care of your question, please mark your thread as Solved.

  9. #9
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    can we add total value of the assets in the report that we are generating,is that possible..

  10. #10
    Registered User
    Join Date
    08-12-2014
    Location
    Việt Nam
    MS-Off Ver
    2007
    Posts
    32

    Re: Generating reports based on conditions

    Hello.
    Thanks sktneer, it is very perfect.
    I don't use VBA to do report. I use add-in a-tools in excel. It use SQL language to do report. It is easy with the people who are not good in VBA.
    akbar, if you care, i will sent link youtube to you.
    Thanks.

  11. #11
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Hi,
    i'm a novice in VB,so i can do only some basic stuffs,if it could help you can send it through..

  12. #12
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Hi,
    i'm a novice in VB,so i can do only some basic stuffs,if it could help you can send it through..

  13. #13
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    Please find the attached with the modified code as per your requirement.
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Thanks sktneer,but i think there is a problem with the code,please find the attached pics,

    It's not filtering upon the three conditions simultaneously..
    Attached Images Attached Images

  15. #15
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    Oh that's my mistake, I didn't consider that case. Please find the attached sheet to see if you get the correct desired output now.
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    That is perfect sktneeer..

    just one more doubt,whenever we generate reports it gives continuous names such as Book1,book2 like this,anyway of getting
    rid of that..if we generate 50 reports,it will be book50..

    Thanks,
    Ak

  17. #17
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    Quote Originally Posted by akbar View Post
    just one more doubt,whenever we generate reports it gives continuous names such as Book1,book2 like this,anyway of getting
    rid of that..if we generate 50 reports,it will be book50..
    Ak
    Does it really matters? Since you are not going to save these workbooks.

  18. #18
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    it doesn't matter,just to be curious if could do that by clearing temp files or something like that..

  19. #19
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    Clearing all kind of temp files manually is a routine process which you should also follow.

  20. #20
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Thanks..

    I was trying to assign the macro with the command button as u did in my original template with the normal
    shaped box,but it didn't worked for me..could you please tell me how do you manage that,usually i have seen something like
    this when you assign it to the button..but in your script its not there..

    Sub RoundedRectangle3_Click()
    '
    ' RoundedRectangle3_Click Macro

    Thanks,
    Ak

  21. #21
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    To do that create a shape of your choice and format the shape as per your choice then right click on the shape --> Assign Macro --> Select the macro from the list --> OK.

  22. #22
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    Please don't send PMs related to your thread. If you post your question here, the chances are you may get an answer from other members also if I am not able to answer it.
    All questions and answers will benefit other posters like yourself when discussed in public threads. The point of having a public forum is to share solutions to common (and sometimes uncommon) problems with all members.
    I hope you understand.

    I have corrected the code considering my last attached sheet. I don't know whether this contains the latest modified code or not. (That's the drawback when you try to get answers through PMs as nobody keeps records permanently due to storage of Inbox issue. So I don't remember what was the latest modified code.)

    With the code in the attached sheet with this post, you will get an idea about how to make changes in the code as per your latest requirement. If any case is not considered in this code, please make proper changes in the code with the help of last modified code as I assume that was working perfectly as per your earlier requirement.

    Please find the attached sheet with the modified code.
    Attached Files Attached Files

  23. #23
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    I do understand,the thread was already mentioned as solved hence i have PM you..

    Thanks skt..let me have a look..

  24. #24
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    I do understand,the thread was already mentioned as solved hence i have PM you..

    Thanks skt..let me have a look..

  25. #25
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Skt..when we are giving other criteria it is working,but when we select just only any
    date range it won't populate any results..

  26. #26
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    I don't think so. I checked it. See the attached sheet where only End Date is mentioned and it generates the report successfully.
    But if you are talking about anything else, please upload the workbook with the code you are using.
    Attached Files Attached Files

  27. #27
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Just take of the other two criteria and see..i need to sort it like from a specific date to another..

  28. #28
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    Which two criteria? Better you show me what you have and what report you want to have.

  29. #29
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Please find the attached image..


    Quote Originally Posted by sktneer View Post
    Which two criteria? Better you show me what you have and what report you want to have.
    Attached Images Attached Images

  30. #30
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    OK. Please find the attached sheet to see if this works as per your requirement now.
    Attached Files Attached Files

  31. #31
    Forum Contributor
    Join Date
    02-04-2008
    MS-Off Ver
    Microsoft Office 2007
    Posts
    261

    Re: Generating reports based on conditions

    Thanks Skt..that is perfect...

  32. #32
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generating reports based on conditions

    You're welcome and thanks for the feedback.

+ 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. Generating reports
    By pacer31 in forum Access Tables & Databases
    Replies: 3
    Last Post: 07-13-2011, 03:29 PM
  2. Generating reports
    By Prestonecst in forum Excel General
    Replies: 3
    Last Post: 06-03-2011, 03:25 PM
  3. Generating reports using macro
    By cvsuryam in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2011, 03:09 PM
  4. Generating Reports
    By V for Visual Basic in forum Excel General
    Replies: 3
    Last Post: 10-21-2009, 06:50 PM
  5. Generating Reports
    By peterbuilt in forum Excel General
    Replies: 3
    Last Post: 08-04-2008, 05:46 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