• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Looking for some code to search all worksheets in a workbook with inputBox

Belleke

Well-Known Member
Hello,
I am looking for some code that searches a value in column C in all the worksheets in a workbook from een inputbox entry.
If an entry is fond copy that row to a new sheet (summary) text only, no borders, colors etc, than go to the next sheet and copy that row again and so on until all sheets are searched.
The value of the inputbox exist only once in every sheet (unique name)
8 sheets have to be searched, so I should get a summary sheet of 8 lines
Please advice
 
Add/Fill/Move/Copy those Your eight sheets to this workbook and
press [Do It]-button.
Later You can delete 'Summary'-sheet,
but then You gotta run that 'Do It' manually!
> Ideas? ... Questions?
 

Attachments

  • Belleke.xlsb
    39.6 KB · Views: 12
Hello vletm,
That is exactly what i wanted, now i have to fine-tune it like adding the sheet name and the headers of the sheets with are in Range F6:AB6
The result should be someting like this:
Sheetname 1
headers sheet 1
Sheet 1 row from inputbox value
Sheetname 2
Headers sheet 2
Sheet 2 row from inputbox value
etc ...
I gonna play arround a bit, but if you have some suggestions, please advice.
Thank you so much for the help until now.
 
Could You recheck how do Your 'the result should be' from Your #3 Reply?
Or do You try to mean something like: You would like to get 'sheet's name' also to 'Summary-sheet' and one or eight times headers too?
 
Thank you so much for your quick response
I included an example, hope it is clear that way
 

Attachments

  • example.xlsb
    9.4 KB · Views: 8
Thank you, thank you vletm!
The result is exactly what I want, except I want to use it from a button in a userform, I get the exact rapport from the button in the userform, but when I click on printPreview, I get a message nothing to print, any suggestions?
Thank you for all your efforts.
 
... it would be challenge to figure without Your Userform or that file.
Especially, what would that 'printPreview' do and which 'printPreview'?
Your original needs was to do this with InPutBox ... now something different?
 
vletm, thank you again,
The main goal is, once the repport is made to save it as a PDF , but printPreview gives nothing to print , so the pdf code gives the same message because it seems nothing is there to make a pdf.
Your original needs was to do this with InPutBox ... now something different?
This stays the same, but instead of from the button DoIt it should work from a button in a userform.
Thank you for your patcience
 
.. it would be challenge to figure without Your Userform or that file.
I know but the file is about childeren under 5 y, so i have to walk on eggs before posting something.
 
What would that 'printPreview' do and which 'printPreview'?
Take a screenshot from that 'printPreview' that could figure what're You using!
If You'll use UserForm that code needs changes!
You can DELETE ALL rows of those data.
I don't need Your data. I can use my sample files data... no need eggs!
 
Hello vletm
Example included
Under the button 'overzicht', in the userform there should work your perfect summary code
The goal is to create a pdf of the summary and save it in the same dir
Sorry for the delay
 

Attachments

  • example.xlsb
    192.9 KB · Views: 5
Belleke ... good timing, just notice this ... but ...
#1) I am looking for some code that searches a value in column C in all the worksheets in a workbook from een inputbox entry. 8 sheets have to be searched, so I should get a summary sheet of 8 lines
#5) There were still only 8 sheets ...
#12) Now, there are more than 8 sheets, which 8 should search?
Those 8 sheets maybe should know or any matter which sheets will use?
Your Userform ... I don't/cannot use ActiveX-components?
or is somewhere else any of those (ActiveX-components)?
>>> I have to make a new Form and I should know how to change its code.
#9)
I get the exact rapport from the button in the userform, but when I click on printPreview
Where is that 'printPreview'- button?

>> Is there still something 'missing' that this could try to change?

>> Ideas? ... Answers? ... Questions?
 
Sorry,
For your first question
Sheets
Namen invoer
Groepen
Summary
Extra informatie
Template
Should be excluded
For your second question
There is not a preview button, just the excel preview to check the result
 
You changed .. a little .. so I offer some changes too :)
... like 'Sheet'-selectie from Cell B3 (Data-sheet)

Summary NO work NOT yet! as well as UserForm is missing ...
Ik zal blijven na het eten :) or something like that, Okay?

Ideas? ... Answers? ... Questions?
 

Attachments

  • Belleke2.xlsb
    71.9 KB · Views: 9
Version3 ...
- still no UserForm
+ test to PrintPreview
+ DropDown in Summary-sheet
>> Ideas? ... Answers to #13? ... Questions?
 

Attachments

  • Belleke2.xlsb
    87.8 KB · Views: 7
Hello,
It seems you have put a lot of work into this.
The raport looks nice, great job
Your approach is different but I like it,
Now, I gonna try to implement the code for filtering and deleting in your example, then I come back to you.
Thank you for the great work.
 
Who will use it?
You or someone else?
Someone would know what would like to see ... I could give just ideas.
 
hello vletm,
The users are teachers for childeren between the range of 3y and 6 y old. most of them have little knowledge of excel.( i am not a teacher there, just a friend that wants to help a friend that teaches there)
First question was the filtering (see the code under button 'Ok' in the userform)
Second question was deleting a student (see the code under button 'Verwijder leerling' in the userform) and the last question was the summary , what you solved perfectly.
Any suggestions , ideas are more then welcome, you are realy a great helper.
Thank you so much.
 
Teachers helper - ex teacher too :)
Check these ideas ... filtering, deleteing, summary + bonus 'sort'.
Did You tried to print Summary-sheet?

... still there is possible to select name from 'Summary'-sheet,
which would look ... better? maybe next time?
 

Attachments

  • Belleke2.xlsb
    87.6 KB · Views: 13
Back
Top