VBA Code For Searching For Specific Information
Jul 16, 2012
Basically I am trying to write a code:
Using a Month specified in an input box eg: July Payday
Look up that month on the "info" worksheet to then copy and paste all the dates for that month on to a worksheet called "Working Hours". This is the code I have at the moment...not much I know, I don't know how to format the code in to tags:
Sub WorkingDays()
Dim LastRow As Long
Dim Month As String 'setting the object of Month being the data we need to find
Month = InputBox("Please enter the month you wish to record, eg July Payday")
'Typing the Month which we need to copy the dates for
View 2 Replies
ADVERTISEMENT
Jun 11, 2014
I am working on a project that I feel should be relatively simple but I seem to be stuck. My Goal: To add information to specific rows of data in the worksheet. I want to use a user form, and eliminate as much typing for the user as possible. I have already designed my user form, and written the code to identify the row in which I want to edit. Nonetheless, I do not know how to code the insertion of the new data. The data I want to add will be in empty cells at the end(right) of the data table.
I have attached a portion of my data set.InsertQuote.jpg
Here is where I am. The words in red are just colloquial words that I cannot seem to put into code.
Private Sub CmdInsert_Click()
Dim Company As String
Dim PartNumber As Variant
Dim Condition As String
[Code] .....
View 1 Replies
View Related
Jul 16, 2014
search sheets by the name of cell , like name would be 17012-23-12-45 i need search by the first 5 letters 17012 , because sheet name 17012 , it would be for a lot of sheets so i need to do it automaticaly , and then that specific sheet has been found i need to copy table from there and some pictures in there
View 4 Replies
View Related
Feb 11, 2010
I have created a userform that allows input of information and then deposits the information on a specific sheet. I am looking for a way to have that information not only deposited on the specific sheet it is already set to but also to another sheet based on a selection made from a combo box.
here is my current
View 5 Replies
View Related
Mar 24, 2014
I'm trying to match certain transactions between two bank accounts, where the only like values are going to be date and disbursement/deposit amount. Obviously vlookup will not work here because there are many duplicate values. In the attachment I put in a Vlookup in the Account 2 tab to try and demonstrate what I'm trying to do exactly, which is match deposits in Account 2 with Disbursements in Account 1.
After looking around I found that maybe a combination of INDEX/MATCH would work here but how to get it to work or even if it is appropriate in this situation.
View 1 Replies
View Related
Mar 15, 2007
I have 1000 diff names in a spread sheet and wish to search another spread sheet with these names on and alot more.
I want the search to look in the larger spread sheet for these 1000 names
and copy all the informtaion in the cells to a new sheet, if the name is not found i would like something like "no info found" to be seen.
Im a novice to doing this sort of thing in excel, but i have found this script which searches for the word "mail box" and copies all the info in the cell when it finds it.
View 14 Replies
View Related
Mar 12, 2014
I have five worksheets hidden in my workbook. All of these worksheets have either "Yes" or "No" written in cell C4. (3-yes, 2-no)
I also have a search bar in the form of a textbox and a command button.
I want to be able to type "No" in the textbox, click the command button and have the pages with "No" in cell C4 to unhide.
Some screenshots if necessary:
Sheet1 (yes): Gyazo - ce85d71bc03cd2ceaa1030e22445800f.png
Sheet2 (no): Gyazo - 65f876d6e7d749bd1ca25ad957fbda99.png
Sheet3 (yes): Gyazo - 0cb442f1d34e7d744884f73e1afe2646.png
Sheet4 (yes): Gyazo - 6f0ce150322208fd93dc5fc6f4f66481.png
Sheet5 (no): Gyazo - 772f48f8a82e53713794e6655fe56fca.png
master: Gyazo - 1b71470f3de47cef347050588bca819c.png
View 4 Replies
View Related
Apr 15, 2014
Is there a way to search responses from a specific Person? I think it was before the Mr Excel format change. Domenic was the responder.
View 2 Replies
View Related
Jun 22, 2006
I'm building a spreadsheet which has a formula which performs a vlookup on a sheet. Now I want to leave the vlookup formula so that you don't need to change it. What I want to achieve is that the vlookup table array references a cell in the current worksheet which is a name of another worksheet.
What this will enable me to do is to keep the forumla unchanged by by changing the cell with the worksheet name in it points the vlookup to a different sheet. This is because I have multiple sheets which have similar data on and I don;t want to edit the forumla to point to the different sheets.
View 5 Replies
View Related
Jun 4, 2012
some of the code proved inflexible when applied to other columns of data. I have some VBA code that could work if it can be modified. First the code:
Sub ColorMe()
Dim lRw As Long
lRw = Range("B" & Rows.Count).End(xlUp).Row
[Code].....
The way things are right now, if a cell in the B-column contains the word "April" (and ONLY that word), the contents of the C-column's cell on the same row receives a red font color (index 3 as per the example above). The idea is to modify the code so that it searches for the word "April" in a string of text such as "Mike's April Trip" and color the contents of the cell to the right of it accordingly. Is this possible?
As an aside, conditional formatting does not work for the purpose that the cells are being colored for. It needs to remain hard-coded like in the script above, hence why I am just looking to modify something that 'sort-of' works.
View 5 Replies
View Related
May 21, 2014
I have the following code, that searches the entire workbook. I came across an issue when searching for terms that are on my main page where my search results appear.
Code:
Public Sub Find_box()
Dim ws As Worksheet, Found As Range, rngNm As String
Dim myText As String, FirstAddress As String, thisLoc As String
Dim AddressStr As String, foundNum As Integer
[Code].....
View 2 Replies
View Related
Nov 17, 2008
The easiest way of explaining what I'm after is to say, I have letters of the alphabet, in their own cells, and I want to find them by way of a search. I don't mind how this is done, but it would be good if for example you entered A, C and E, any cells containing those letters changed, maybe became bold, or the cell filled with colour.
View 9 Replies
View Related
Sep 25, 2013
If I'm using this function to find the specific text "EXPIRED" in the specified cells, how can I add additional cell ranges on the same sheet to this function?
D17:D34 as well as F17:F34
=IF(ISERROR(MATCH("EXPIRED",Homepage!D17:D34,FALSE)),?"OK","ALERTS")
View 2 Replies
View Related
Oct 11, 2013
I am trying to write a macro to open a specific file, but need to search multiple folders within folders to find it.
The file name I need to open is "Escalation Adherence-Details " & Format(Date, "mm-dd-yy") & ".xlsx".
I need to drill down to the Adherence Report folder and then have the macro search through folders for each year (2012, 2013, 2014, 2015, etc) and then each month within each year (1 January, 2 February, 3 March, etc), at which point I would then find that day's file.
So far I have the following:
Code:
Sub Open_ESCL_Report()
Workbooks.Open Filename:=*****.****.****.******.comsharesPurchasingTeam XEscalationAdherence Report & "Escalation Adherence-Details " & Format(Date, "mm-dd-yy") & ".xlsx"
End Sub
Each file is stored in it's respective month folder as .....Adherence Report(Year)(Month)(File).xlsx
View 3 Replies
View Related
Nov 8, 2013
I would like to select all cells in column A that begin with the text "SP". Some cells will be contiguous but others will not. For instance in one case, I would like the macro to select cells with the text "SP" which would result in cells A1, A2, A3, A10, A15 being selected. I am working on building a macro that will then do other things to these cells/rows so this is the first step.
The below code will select the first cell with "SP". How would I alter this code to only search Column A and select multiple cells? or totally different code.
Code:
Sub test()
Dim r As RangeSet
r = Cells.Find(what:="SP", LookIn:=xlValues, lookat:=xlWhole)
If Not r Is Nothing Then r.Select
End Sub
View 7 Replies
View Related
Apr 28, 2006
on one sheet we have a summary of the main list, which includes totals of money recieved, totals of all the different sources (ie, where they heard about us from), the totals of the frequencies they pay (ie, how many donate monthly, quarterly...) ... etc. on the next sheet we have the "main" list of donors, their IDs, amounts, frequency, source ...
the totals on the first sheet are updated manually, but i want to change that as there are a great number of errors.
View 8 Replies
View Related
Aug 29, 2012
I have a macro that checks data in a worksheet and manipulates the data.
the problem that I am finding is that the worksheet data, which is copied from another file, is different sizes - eg: in one file the data may be from a1 to f2890 but another file the data may be from a1 to f5990.
When the file is bigger I have noted that the macro does not check the rows between 2890 to 5990.
How can i get it do check all the cells no matter how big the file is?
View 9 Replies
View Related
Feb 4, 2014
I have a sheet that has 4500 items on it and want to create a new sheet so I can type in a part number and get the information on the row that number is on.
so in the (new blank sheet) cell a3 will be the input cell and cell a5 to a9 will show the data.
View 8 Replies
View Related
Nov 21, 2011
I have a range of cells (A1:K20 for example) and I'd like to have Excel count the number of times a certain set of initials (PT for example) showed up in any of the cells within the range.
View 7 Replies
View Related
Mar 1, 2014
I have found a list of newspaper in an excel file and at the end of the text it is written the name of the language e.g Bangladesh News 24 (Dhaka) [In Bangla], The Bangladesh Monitor [In English]. I would like to distinguish the names ended with [In Bangla] and in [In English]. How can i distinguish this two different type of data with VBA?
View 1 Replies
View Related
Feb 1, 2008
1. When text is entered into a specific cell in the Master Sheet a new Tab is created named after this text and a second string of text i.e the date.
2.At the same time as this TAB is created I would like only the rows with checkboxes ticked in the Master Sheet to be copied to the new TAB(Not the Checkboxes themselves) [possibly using TRUE/FALSE in "B" row].
3.I would like the formulas, formats of these checked rows to be copied too.
4. Additionally the first 12 rows(all headers) and the last row(subtotal row)should be copied too.
The idea of the Workbook is to have an overall options sheet that is customised on a per customer basis with a record saved on a new tab in the same workbook.
View 14 Replies
View Related
Sep 5, 2008
I need to create a simple code that will allow me to fill out the userform and then use a cmdbtn within the userform to transfer the information from the userform to specific cell in my excel spreadsheet.
View 10 Replies
View Related
Jun 3, 2009
I have a column 'AE' that contains the html code for ecommerce item descriptions. While importing/exporting back and forth with another program and my spreadsheet, the following was added all throughout the descriptions.
%0d%0a
In some places, it may be three or four times consecutively
%0d%0a%0d%0a%0d%0a%0d%0a
Is there a macro script I could run to simply remove this any time it occurs in this column? It is just showing up as text and I am sure in another program it was representing something other than text, probably a space or hard return. Regardless, I don't need it.
See example below: ....
View 8 Replies
View Related
May 22, 2014
I need a macro to move specific information.
I get an excel sheet with W/C Employer: (whatever) entered below the patient it belongs to in column E. This information needs to move into its own column (H) in line with the above patient information so I can use it in a mail merge to word.
The same thing needs to happen with WC injury date listed in column G. It moves to column I. Then delete the row it was moved from so I don't have an empty row.
Sheet 1 is what I get. Sheet 2 is what I need to end up with.
View 4 Replies
View Related
May 30, 2014
Check the attached sample file
a. actual data in columns is approx 150 items (that is why i need to hide/unhide columns)
b. there are about 120 persons whom above items are issued depending on expiry of life of item i.e. issue date plus number of months mentioned in row 3. for example if coat was issued to John on 5th Jan then it's life expires on 5th May and so on.
Now what i want
1. by clicking hide checkbox only that specific column should hide or if i click Hide All check box all column in range should hide.
2. as i enter issue date expiry of that item should automatically update on corresponding month sheet i.e for above example 5th May should automatically get entered in sheet May.
I have entered sample data manually in months sheet.
aJITCBP.xlsm
View 2 Replies
View Related
Jan 29, 2014
I have filled up my ComboBox1 with the sheets I want to add information to. My problem now is how to place the info in the correct sheet when I click CommandButton1.
I've been working on this for a few hours now. I got this to work on the first code I found but it didn't work afterward. I just deleted the whole thing and started again.
View 1 Replies
View Related
Dec 31, 2013
I have a spreadsheet using an Input Form (user cannot get to the spreadsheet to enter data - they must use the form). This is working well.
What I need to do now is allow the user to retrieve data that is already entered. Example: Spreadsheet has 100 unique records (rows). In each is ID, Name, State, Dues, and about 20 other columns of information.
I need to allow the user to key the ID # and then up pops all the other information for just the ID provided. I will also need the ability for them to then change that information if needed.
So if they key 13WIL they will get Wilson, TX, $50, etc. And then they can make changes to any field needing a change. Add a phone, change and address, etc.
View 3 Replies
View Related
Nov 11, 2013
I'm trying to create a database where when 3 dependent drop down list selections are combined, information is displayed.
I've tried VLOOKUP and INDEX/MATCH but to no avail.
Attached is the spreadsheet and what I am trying to accomplish. On the first sheet ("budget form") is a table named "Event Costs - room hire". I have created three drop down lists that interact based on what you select. Some rooms offer different services and so are dependent on the selection.
However, I want the final box to display the price depending on what is selected in the previous 3 lists. The amounts and a table I have created is in the "Product Database" sheet and the table is labelled, "Room Hire Control C".
View 5 Replies
View Related
Oct 29, 2008
My workbook contains several worksheets each recording the results of equipment tests - one sheet for each piece of equipment. Rather than open each worksheet to check the date of the last test, other 'overview' worksheets pick up and display the last test date from each equipment record using the formula =MAX('sheetref'!A15:A500). Is there a better formula to do this?
Some items of equipment are tested at more than one frequency, ie Monthly, Yearly, etc. Therefore, the entry on row 15 of an equipment record may be column A 28/10/08 column D 'M' and row 16 column A 29/10/08 column D 'Y'. The above formula will only display the last test date, irrespective of frequency. There is a seperate overview sheet for each test frequency therefore, I need to modify the formula so that the date it copies from the equipment record worksheet to the overview worksheet is the date of the last test for the specified frequency.
View 9 Replies
View Related
Mar 11, 2014
Is there a way to prompt users to enter information in a specific range of cells before they save?
View 1 Replies
View Related