+ Reply to Thread
Results 1 to 34 of 34

Task - If a cell on a row contains "text" then enter data from various points on new work

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Task - If a cell on a row contains "text" then enter data from various points on new work

    Greetings all, i have a new project and im pretty stuck on best way to do what i need to be done.

    Basically in sheet "Audit i will populate data in various fields. once completed i need a report.

    Sheet 2 "report" Contains a couple of headings that i wish to automatically populate with the data from sheet "Audit" If cell D contains N or NO which signifies non compliance i want for each instance of this to be entered in Report sheet copying over the relevant information to each box and go down the page accordingly.(as a plus if it adds borders even better)

    So for example: row 3,5,7 in my example file would be NO for non-compliant and i would then want the report sheet to contain going down all 3 clauses their particular requirement info, details of non compliance and category. (See Sheet "sheet 3" of what it would look like if working right)

    Example Book.xlsx

    If anyone can help me i would be most appreciative as i have spent hrs trying various things using functions and it seems i need some kind of macro to perform the task...

    Kind Regards
    Dave.R

  2. #2
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Hi,

    See the file.
    Attached Files Attached Files

  3. #3
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    HI, Refer the attachment with formulas
    Attached Files Attached Files
    Click just below left if it helps, Boo?ath?

  4. #4
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    WOW and i mean WOW such a good response and so fast!! made me feel really stupid lol

    Thanks to both of you for replys. the 1st file seemed to be difrent to the second file but im not sure how these were made or how they work?

    the 1st file seems to use drop down lists on AUDIT sheet which is displayed on my Report sheet except if i change a value in AUDIT sheet from N to Y or visa versa it doesnt update report sheet.

    The second sheet does exactly what i wanted but i dont understand how it is done, Maybe you can explain to me so i can use this going forward in other projects.

    In any case second file is what im going to use as it works straight out off the bat!

    Cheers Guys or gals! /respect

  5. #5
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Hi,

    By first sheet are you ref. to my file?

  6. #6
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    I was referring to the other one but on further investigation i figured your one out also and it also works perfectly albeit formatted differently. 2 working results to same question AMASSING.

    Would it be possible to in the Report sheet add results from 2 Audit Sheets from same work book in same way? so for example if i had 3 issues in sheet 1 and 5 in sheet 2 those would be displayed together on report sheet? and have those formatted to have a box around them?

    Regards

    Dave.R

  7. #7
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    I would suggest to compile all AUDIT Sheet into one main sheet and then form a REPORT.
    Or,

    Why don't you use Pivot Table?

  8. #8
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    New Example.xlsx

    I did not know what a pivot table is and having had a quick look over it im not sure how i can use it but its worth me investigation in my own time.

    For the project im doing i EFB and your file worked but style wise id like to stick with EFB version.

    In any case i have been trying to figure out how it actually works as simply trying to change cells reference ID'd within the formula's to match my actual work book doesnt seem to work, even if i try to reproduce same formula in same format in a fresh book:/

    Attached is small version of my book im working on with all the fluff removed.

    So Sheet AuditA and AuditB are 2 sections of an audit i do, so when i flag "N" in comforms column it should then add that info from that sheet to the Report form like in the 2 examples you guys gave me (preferably style wise like the EFB file) Ideally if you can make it work on one of my sheets in this file this would be Awsome with an explanation of how it actually works?
    Even better if possible can make it so it created one report which summarises both sheets to look similar to EXAMPLE Sheet on file.

    and if this is done i think i will owe somebody a drink!!
    Last edited by Darkprophecy; 10-17-2014 at 06:04 AM. Reason: additional information

  9. #9
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    please if anyone can help with this.

    need to make EFB report sheet on to New Example report to reference data from audit sheet a sdescribed in previous post, im really stuck on this. been learning all about vlookup, index , pivot tables and iferror and can not for the life of me see how to get the result from EFB file to my new example, it just keeps failing...

  10. #10
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Wait for some time, will see how best I can help.

  11. #11
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    i will i got all weekend lol, spent 2 days trying to get to stage you guys helped me get to. so close but so far...
    appreciate anything ya can do.

  12. #12
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    See the file, it uses VBA, I had placed a button on report sheet. Any time you update any clause on any audit sheet and come to report sheet and press the button the data will be updated. Also note with this solution if you add more Audit sheets, those sheets will also be taken care of.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    il take a look at this when i get home i appreciate your efforts.

    is there a reason why this time you used a macro rather than formulas like in your 1st file and EFB version?

  14. #14
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    In my experience in Excel (which is not very much) for creating such reports where various sheets are involved Formula are not capable of looping through sheets.

    VBA has a upper hand. The code I had used is very simple not complex just two loops and few IF's. Go through it, apply it on your original file and if you face any problem than write back.

  15. #15
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    New Example 2.xlsm

    Had a good look at what you did and it works fantastically i think your a rock star. I can see why you chose to do it that way rather than in cell formulas.


    Would it be possible to apply the same code to this new file? so that with data in right place looking like my Report sheet does now? i thought there might be a way to either create the format like i did in the vba creation part like it does when it labels cell "Clause" or somiething or it could be programmed to ignore the format i created and start the report below it rather than clearing each time button is pressed.

    Additionally- where i placed compile report button could the VBA be adjusted to check for a tick box of some kind or a cell with a number or word in it to compile report based on that requirement?

    For example if i wanted to compile full report of all sections then i "tick a box" for full or enter word full in a cell. summarily if i wanted to just compile 1 specific section i could tick section 7 box or enter 7 in a cell?

    i was thinking i could have say 8 tick boxes labelled next to compile button that i could tick then compile to perform that function or perhaps one cell to enter FULL, or 1 or 7 for example then hit compile...

    Again any help appreciated.

    Regards
    Dave.R

  16. #16
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Can you wait on this for a day or two.

  17. #17
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Of course i can mate! its the weekend, enjoy it!
    At least the weather is ok at the moment. BEER TIME!

  18. #18
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Hope you had a good weekend?
    Have you had a chance to look at this again for me?

  19. #19
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Yeah I did had a good weekend, now back to my home town for some leave days. Will see now.

  20. #20
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Good to hear leave and home always a good combination

    Any joy in looking over the file?

    I had a play with some of the code but i cant get it to work right, feel useless.
    Last edited by Darkprophecy; 10-23-2014 at 05:23 AM.

  21. #21
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Sorry to bother you guys again, but if any chance somone could take a look at this again for me as im needing it to be right as soon as possible and my tinkering is getting me nowhere.

    much appreciated.

  22. #22
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Hi,

    Will give it a short tonight.

    Regards,

  23. #23
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    yeh that would be great, i have been learning what the various parts of code do by trial and error but i can not get it to either create the format i have used within the code or ignore those top 6 lines so it enters the retrieved info below it. ideally id like it to create the layout and use those top 6 lines for each page i print off..

    if theres 4 pages of data retrieved each page would therefore have that layout at the top of the page.

    Page breaks is another issue for another day
    Last edited by Darkprophecy; 10-30-2014 at 03:37 AM.

  24. #24
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    did ya have a chance to look buddy?

  25. #25
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Hi,

    Sorry I could not got time to look at it, may be this weekend I will confirm with a code, just to make sure, you now want it now conditional, adding new line below is not a problem, but if some clause is turned No to Yes that row has to be removed or just edit in the report?

    Regards,

  26. #26
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    the code you have is fine for consolidating the data from those other sheets.... when i hit the button it needs to compile that data in the same way but formatted like i have done so it looks better.

    one way i though of doing it was to have code to ignore the top 6 lines which i have already created columns, formats and labels, but ideally if possible i would like the code to generate that formatting and labeling.. for this project it would be great and the code would be able to be used for other projects going forward...

    perhaps also if possible you could add some comments as to what does what in the code?

    Again i appreciate all the help you can give me..

    Regards
    Dave

  27. #27
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Ok, But I did not understood one thing the headers on sheet Report from row 1 to 6, do you want that 2 generated from code or they will be static and data should be populated from row 7?

    No. 2) There are some columns on report sheet that dont have data on other sheets like Column F,G,H & I on report sheet, where these columns will get the data?

    Regards,

  28. #28
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    sorry for delay in reply,

    to answer your question: Ideally yes i would like the code you made to turn a blank clear sheet and format the top 6 rows they way i have shown with the data that is consolidated in your code starting from row.

    (if this is not possible then like you mention the top 6 rows could be static and the code could display results from row7 with the text format and size etc defined in code)
    --------------I would prefer if possible for whole thing in code a si could then use in many projects going forward that use similar formats-----------

    to answer your second question: yes there are some headings that have no reference to data. This is because once the form is created (including consolidated data from other sheets as a result of "n" or NO") this would mean the auditee would need to complete manually entering information in columns F to I

    If its at all possible where the code enters info in the columns could it draw a border around all cells from A to I? where data is present?

    Again thanks for all your help any more questions please feel free to ask.

    Cheers

  29. #29
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Hi again sorry to spam i was just wondering if this last post made sense?

  30. #30
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Hi,

    Sorry I was ILL. See the file, hope this will meet your requirement.

    Regards,
    Attached Files Attached Files

  31. #31
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    ahh i hope its not too serious, dam office flu going about its like pass the parcel with germs LOL, i will look it over today with excitement

  32. #32
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    The sheet now works an absolute treat thank you so much it is really workable now.

    can i ask if it is easy enough to do a few more things? mainly formating.

    1) add an item number if there is text in the clause cell next to it?

    2) cells in column F,G,H,I and their cells below row 7 to have the text wrap turned on.

    3) columns A,B,E below row 7 to have a text size of 16

    4) Column C text size 12 under row 7

    5) columns D,F,G,H,I text size 14

    Im sure there is probably a realy easy way to do this but i dont want to muck up what i think is wicked code by your self


    With the above done is it possible to add another feature to your code?
    specifically where A2:C2 is currently merged and i wrote some stuff in the box i was thinking.

    Could there be say 8 tick boxes placed in there that determine which sections are compiled in to the report?

    Example Tick box 1 , Tick box 2 , Tick box 3 up to 7 tick box 8 = ALL
    so if 1 and 2 are ticked then consolidate data from only section 1 and 2 sheets. if box 8 ALL is ticked report on all 7 sections sheets.? if tick boxes are selected and 8 also return an error message or something..

    this would be cream on the cake and well worthy of me to worship the ground upon which you walk

  33. #33
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Hi,

    See the file, it take care of all the formatting. As far as the last tick box thing is concerned, I doubt it will take some time and next week I am busy with some official work so will not be able to devote time on it.

    Hope you will understand.

    Regards,
    Attached Files Attached Files

  34. #34
    Registered User
    Join Date
    08-27-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Task - If a cell on a row contains "text" then enter data from various points on new w

    Quote Originally Posted by misrasomendra View Post
    Hi,

    See the file, it take care of all the formatting. As far as the last tick box thing is concerned, I doubt it will take some time and next week I am busy with some official work so will not be able to devote time on it.

    Hope you will understand.

    Regards,
    I totally understand work is always priority etc and i appreciate all your help..

    I will just try and see if i can learn more and figure something out....one option is to just leave all sheet sections clear and consolidate report after a section is audited, this will only report from that section. then if i needed entire audit of all sections just consolidate entire book all 7 sections.

    i just figured if i had a check box system it may be more use full in long term...

    Again thank you for your help..

+ 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. [SOLVED] Range("A1") = Sheets("Sheet2").CenterHeader.Text doesnt work.
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2013, 07:06 AM
  2. Find "TEXT 1" in a range and enter "TEXT 2" in the adjacent cell
    By madreag in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-28-2013, 05:34 PM
  3. [SOLVED] if cell i is not enpty then enter "text"or data in cell m and count
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-16-2013, 07:08 AM
  4. Enter Data on "Main" or "Input" Sheet and Copy to One of Many Other Sheets
    By timothy_no7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2012, 07:29 PM
  5. Replies: 4
    Last Post: 02-03-2008, 05:11 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