Find Value On Row & Find Last Used Column Before Found Value
Dim ColNo As Byte
Dim LastCol As Byte
ColNo = Application.WorksheetFunction.Match("Column find", Range("sheet1!A1:Z1"), 0)
LastCol = Range("sheet1!b1").End(xlToRight).Column
But the below code errors?
Dim ColNo As Byte
Dim LastCol As Byte
ColNo = Application.WorksheetFunction.Match("Column find", Range("sheet1!A1:Z1"), 0)
LastCol = Range(Cells(1, ColNo)).End(xlToRight).Column
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Find Text & Offset By Found Value Row And Column
I'm writing some code where I need to know the column in which a specifc text string occurs. Because of the nature of the sheet, the string will only appear in one column, but that could be in almost any column on the worksheet. For example say the text string is "Year 1", I need to find the column with this string, and then offset down to a predetermined row, or offset over to the appropriate column (something like below). With Selection .Offset(0, x).Select If List.Selected(0) = True Then y = i - 1 With Selection .Value = Salary * Inflation1 ^ y End With Else
View Replies!
View Related
Find Text/Value & Use Found Cell, Row, Column In Macro Code
I am trying to clean up and simplify my macros by compartmentalizing frequently repeated commands. I like to search for text in column headings and define the cell containing it as a range that I can later use .column or .row commands on, so my macros are a bit more flexible. The code I currently use for this is Dim XColumn As Range ‘the cell containing the text “X” Cells.Select Selection.Find(What:="X", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Set XColumn = ActiveCell I would like to be able to create a Macro (possibly name FindSetCell()) that will accept arguments and achieve the results of the above code in other macros I think the command might look something like FindSetCell(“text to be searched for”,”name of newly Defined Range”) But I have not figured out how to code it
View Replies!
View Related
Find Value & Insert Row Where Found
I'm having problems with trying to find something in the spreadsheet and inserting a row before it. For example I would like write code that basically goes threw my rows and if it finds the "2800" then it inserts a row before that. I have now bought several books but I have yet to come up with an answer.
View Replies!
View Related
Find Out What Row Or Cell Address That The VLOOKUP Found The Data
When I use VLOOKUP formula within a VBA routine ex: For LoopCounter = 1 to LastRow With Worksheets("0MATERIAL") .Cells(RowCounter, 5).FormulaR1C1 = "VLOOKUP(RC[-2],'0MAT_UNIT'!R1C1:R65520C12,4,FALSE)" End With RowCounter = RowCounter + 1 Next LoopCounter How can I find out what row or cell address that the VLOOKUP found the data? The above code works perfectly but the problem is I need data from that same row in columns 4-11. I replicated the .Cells line above and made each one a VLOOKUP (for column 4, 5, 6, etc...) but this kills the performance. I have around 32,000 rows in sheet 0MATERIAL and around 50,000 rows within sheet 0MAT_UNIT
View Replies!
View Related
Find User Input & Output Found Row
I am trying to write a match function to return the row of the value I search for. It is properly returning the value of the row I searched for. What I need to know is how do I get it to spit out information in the rest of the row. Here is my code so far: Sub Rectangle2_Click() Dim x As Long Dim Row As Long ' Brings up input box x = InputBox("Please Enter Tool Information", "Search") 'Exits if nothing is entered in the text box 'If x = "" Then Exit Sub 'MsgBox (SearchString) 'SearchString = x MsgBox (x) That gives me a Type mismatch error when I uncomment it out. Something I was adviced of before in a situation like this way to Concatenate the columns, e.g =A2&B2&C2&D2&E2&F2 in a far left column (insert 1 if needed). That was supposed to be so that I can search through multiple columns. When I do that to test it, it never comes up with results. It always comes back as 0 meaning it wasn't found.
View Replies!
View Related
Find Value In Cells, Merge Found Cells To One Column
I need to mine a huge spreadsheet of about 30,000 cells and make columns from specific words. As in. I need to search for all words "table" even if the word is "My_table" or "aTable" and suck them into one column. I have to do this one several words. Let me know if you have the solution. I am trying to write something but I am unsure of the syntax at this level.
View Replies!
View Related
Find Value In Column & Return Cell On Same Row- Different Column
I have an excel sheet I am working on and in columns F1:F2000 I have an IF statment, I need to be able to add more "IF"s to it but I will exceed the 1024 char limit. Is there a way I can put this formula into VB as a function called DocumentType() and then in excel F1:F2000 =DocumentType()? Is it as simple as: Function DocumentType() If(...........) End Function
View Replies!
View Related
Find A Value In Column A And Then Make A Copy Of The Whole Row Right Below It
I have the text value "Ball, Red" somewhere in column A. I don't know which row it's in because it will never be in the same row twice. I need a macro to find this value, then, copy that whole row and "insert copied cells" right below that row and change the value in the newly created cell from "Ball, Red" to "Red, Ball". I tried macro recorder to do this and had no luck... Cells.Find(what:="Ball, Red", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlToRight)).Select Selection.Copy Range("A21").Select Selection.Insert Shift:=xlDown Range(Selection, Selection.End(xlToLeft)).Select Range(Selection, Selection.End(xlToLeft)).Select Application.CutCopyMode = False ActiveCell.FormulaR1C1 = "Red, Ball" Range("A22").Select That's is all there is to it on this one.
View Replies!
View Related
Find Cell Based On Column And Row
I have a spreadsheet which has about 100 different SKUs in column A and the inventory for each SKU by period in columns B:Z So for example B would be P1W1 and C would be P2W2, etc what kind of lookup function would I use in VBA to find per say, the value of SKU #: "27017" in P1W2 ? Apart from pivot table.
View Replies!
View Related
Find & Return Value Same Row, Different Column
I would like to use a macro to find a number in a worksheet, other than the worksheet i'm using the macro in. The number - in this case a material code located in Column A - must be entered by the user in an inputbox, and then return (copy&paste?) the value of another cell (the price of the material - in Column D) in the same row. I recorded a macro envoking the find function, but then it only finds the number which I used during the recording. How do I change the code so that the user can input any number, or what code must I write?
View Replies!
View Related
Find Row Number With Two Column Match
I'm trying to do something similar to the Vlookup function (or Index/Match method) but with two or more parameters to match instead of just one. I want to returnn the Row where two columns match the input parameters. Using Vlookup is a problem because it only returns the first one. Is the standard method to us Vlookup for one parameter, then check the second and if it doesn't match reduce the search field, find the next and check the second again etc? That would work but it would be much simpler if there's a 2 parameter function.
View Replies!
View Related
Find Value In Table Based On Value In Row & Column
I have a table where the columns are named: A, B, C, D and E and the lines are named: 1,2,3,4 and 5. All the cells of this table are filled with values. I want the function to return the value on the correspondent cell everytime I type a combination of column and line. For instance if I type "B2" the function would return the value on this position... Actually I am looking for something like a combination of the functions "hlookup" and "vlookup"...
View Replies!
View Related
Find Row Number Of Last Non-blank Entry In A Column
I want to find the Row Number, not necessarily the cell value, of the last non-blank entry in a Column. If the address of this row is found, then that could also be useful. I believe there are some simple Excel functions to do this, maybe involving the X1Up feature. I've searched the threads and haven't found a clear answer this. Below is code that I custom wrote, but its long and tiresome to use. 'The purpose of this sub is to find the last filled row in a column 'Knowing this last row is useful for telling later ' looping operations which row to stop on. 'The logic of this sub is that it will look down a column.........
View Replies!
View Related
Find Value In Column & Copy Entire Row
way to search for a value in a cell (an unique one) using an input box and then if the value is found copying the whole row of the cell onto a new worksheet in the next available row within a table. I am currently using the following archaic codes: x$ = InputBox("Please Enter Catalogue Number") For i = 4 To 500 If Sheet2.Cells(i, 1) = x$ Or Sheet2.Cells(i, 7) = x$ Or Sheet2.Cells(i, 8) = x$ Or Sheet2.Cells(i, 9) = x$ Then Sheet1.Cells(6, 1) = Sheet2.Cells(i, 1) Sheet1.Cells(6, 2) = Sheet2.Cells(i, 2) Sheet1.Cells(6, 3) = Sheet2.Cells(i, 3) Sheet1.Cells(6, 4) = Sheet2.Cells(i, 4) Sheet1.Cells(6, 5) = Sheet2.Cells(i, 5) Sheet1.Cells(6, 6) = Sheet2.Cells(i, 6) End If Next i End Sub this has the problem that i can't fit it to the next available row and have to be specific for each row. it would also be great if i could put a messagebox in cases where the data is not found, basically saying that the item does not exist and if a simple excel Ctrl+F button or something similar could be attached to the msgbox so that the item can be searched and then added to the next available row.
View Replies!
View Related
Find The Maximum Value In One Column And Retreive The Name Of Cell In Corresponding Row
I spent couple of hours trying to figure this out, but without success. Please check the attached example. I need a formula that will find the max value (number of views in English anguage) in the column "I" and display the corresponding "Headline" value in the column "B". In the example it is "Headline 5". I can not change position of the columns, i.e. "B" must remain "B" and "I" must remain "I". I experimented with Index and vlookup but to no success. I have outlook 2003.
View Replies!
View Related
Find 1st Empty Cell In Row From A Column
I am trying to find code that will find the first empty cell in a row and add data in cell left to right. This code is filling all data in the last cell of the row and I am hoping to have it loop through data and fill the first empy cell (M1) and next data placed (m2) and so on Sub Reportdates() Dim Grid As Range, Gridcell Dim Crit1 As Range Dim Crit2 As Range Set Grid = ThisWorkbook.Worksheets("sheet3").Range(" dates") Set Crit1 = ThisWorkbook.Worksheets("Stageing").Range("J1") Set Crit2 = ThisWorkbook.Worksheets("Stageing").Range("K1") For Each Gridcell In Grid If Gridcell.Value >= Crit1 And Gridcell.Value <= Crit2 Then ThisWorkbook.Worksheets("Stageing").Range("M1").End(xlToRight).Offset(0, 0) = Gridcell.Value End If 'Exit For Next Gridcell End Sub
View Replies!
View Related
Find Next Empty Row And Select Cell In Column A
how i can go about finding the next empty row (and select the first cell of that row (column A))? edit: It probably should be noted that there are cells in Columns A through P. There are rows where all and/or just one cell contains data per row. So i cannot use a " lookup" based on a single column.
View Replies!
View Related
Find Non-blank Cell In Column Then Copy Row
Basically this is what I want to do: 1. Search a specific column (Column 21/U) for non-blank values in Worksheet 1 2. Copy the entire row containing the non-blank values 3. Paste these rows into Worksheet 2. Repeat steps 1-3 an additional 2 times, where Worksheet 1 is always searched but one more column to the right (ex. Column 22/V) is the target column for the search, then the rows are pasted into the next Worksheet (for ex. Worksheet 3)
View Replies!
View Related
Find Value In Column & Copy Insert Row
I have a macro that was working fine until I added a new column to my active sheet. Now it fails with a run time error 1004, insert method of class failed. The code is as follows: Private Sub UpdatePart_Click() Dim S As String Dim r As Excel. Range Range("A2").Activate S = InputBox("Enter the part no. you wish to update") On Error Resume Next If S = "" Then 'Exit Sub 'If StrPtr(S) = 0 Then MsgBox "Update Cancelled" Else Set r = Columns(1). Find(What:=S, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False)...............
View Replies!
View Related
Find Duplicates In Column & Combine Onto Same Row
I have a unique id in column A on a sheet with 20,000 contacts. I need a VBA script to loop through the worksheet and when it sees that there is a duplicate in column A, it needs to take the data from columns B, C, and D of that duplcate and copy them to the first blank cell at the end of the original record. Then it needs to delete the row that contained the duplicate that it just copied. I have searched and found parts of code that will do some of these, but I can't get anything to work, I don't know VB enough.
View Replies!
View Related
Find Text In Column, Copy Next Row And Paste In New Sheet
Essentially, I have 2 Sheets: "SheetWSS" = data to be copied "SheetWSD" = destination of copied data. Below is a sample of the data in "SheetWSS" ----------A------------------------B-------------------------C 1------Trade ID -------Description---------System no. 2--------579----------------Loan ---------------------- 7 3--------580----------------Deposit---------------------22 4--------702----------------Deposit--------------------- 11 5--------703----------------Loan ----------------------- 58 6--------732 ---------------Loan------------------------66 7--------733----------------Deposit-------------------- 99 etc...(no more than 10000) Now, an explanation of the data: 1) I work for a small bank (CORP) that takes deposits and gives loan. 2) CORP books these trades using only system no. 7 and 11; other system nos. belong to customers. 3) When a single trade is booked, the 2 sides of the transaction is recorded (by Trade IDs) . E.g rows 2 and 3 relates to one trade. So if CORP loans money with system no.7 to CUSTB, who uses system no.22, it shows for CORP a loan and for CUSTB, a deposit. 4) Everyday, the data in "SheetWSS" is updated with a different number of rows from previous, but the number of columns remain the same. So, here's what i'ld like the macro to do: 1) Go into Column C, find system no.7 and 11. 2) For each 7 and 11 found, Copy the next row . So if for e.g, system no.11 was found in C4, i want the ENTIRE ROW 5 to be copied. 3) Paste the entire next row in "SheetWSD" until we have a list of all opposing sides of the same transactions initiated by CORP.
View Replies!
View Related
Find Value In Table & Return Column / Row Header
I am having trouble with getting a value (which is the row and column value) from a set of numbers. I have attached an example table to try and make things clearer. What I have is a table with a set of Row Headers, and Columns Headers all numeric. e.g Columns headed 1, 2, 3, 4, Rows 30, 40, 50 etc. I want to find the 1st occurrence of a value e.g. 1.0 in the table (by 1st Up mean closest to top left), and then give me the value of the Row and Column Header that corresponds to that. So for the example attached, I want to get the row Value 200 and Column 6 from finding the 1st occurrence of the number 1. I have tried various combinations of index and Match etc. But I can't get my head around the fact that the position of the 1st no. 1.0 can change, therefore I can't use any releative positions etc.
View Replies!
View Related
Find Column A Of Same Row Anywhere On Row
I typically record macros that need to copy information like a company name from say sheet 2 and paste in a specific cell in sheet 1. As the cursor can be anywhere on a specific row I usually create a column that holds something like zz.. and then in the macro go Shift + Spacebar to select the line I need to work from then Ctrl + F to find zz.. and that is how I know where the cursor is as a starting point. How is it possible to have the cursor know how to find a specific point i.e. column A from any specific column on that same particular row?
View Replies!
View Related
Find Text And Copy Found Range
I have some EXCEL files, titled as "AAA", "BBB", "CCC", so on... Calculated values are placed in Column Z for each file. In order for me to export the files to another software, I would need to create another new EXCEL file (I call it MASS) and place all the calculated values in that new file. In that new file, the titles have to be on Column A and the calculated values on Column B. For example, File "AAA" has 120 calculated values. In MASS, the word "AAA" has to appear on Column A a number of 120 times and the 120 calculated values are then placed on Column B. Each value must correspond to the word "AAA". The same procedure goes for "BBB", in which the word "BBB" is placed on Column A after the end of "AAA". What I want to achieve is by using a macro that will look up the title of the Active Worksheet and then scan Column A in MASS. If the title matches whatever is in Column A, then the macro will paste the corresponding calculated values onto Column B automatically. For example, for file "GGG", the macro will look up the word "GGG", scan through Column A in MASS for the start of the word "GGG" and paste the calculated values at the start of Column B. Could I have an idea of how might the macro looks like?
View Replies!
View Related
Number Of Cells Found By .Find/.FindNext
I'm trying to use the .Find and .FindNext functions to find how many cells in Worksheet("WAS") have the same value as the ActiveCell (B3 in this case) on the Worksheet("DDS"). Basically i'm just trying to figure out how many times this sub goes through the Do While loop. However, "tick" keeps coming back as a value of 1. I know there's something I must be doing wrong or something i'm not allowed to do but i'm still pretty new at this.
View Replies!
View Related
Handle Find Method Error When Value Not Found
I have error trapping in place so if a find in a column returns no data the procedure continues, but the code breaks there anyway. In Tools/Options/General/Error Trapping I have Break on Unhandled Errors checked. I have changed my error trapping lables. I have copied the procedure and renamed it.
View Replies!
View Related
Find Method Without Selecting Found Values
My worksheet contains several codes that I then have to lookup in a different worksheet in a different workbook to obtain the relevant data associated with that code. At present I do this by activating the appropriate worksheet, Using Find to locate the appropriate field in that worksheet and then using activecell.offset to get the needed data. This is the only time that these worksheets ever need to be activated so I was wondering if there is a way to do this without having to actually activate the sheet. As an exapmle this is what I currently do: ' variables defined earlier in the program, Tempsheet = workbooks(FileNm & ".xls").worksheet("Temp") Spark = Cells(TRow, 8).Value ' Activate the reference Sheet Workbooks("Waveguide Properties.xls").Worksheets("Spark Bends").Activate Cells.Find(What:=Spark).Activate COM = ActiveCell.Offset(0, 2).Value Edge = ActiveCell.Offset(0, 3).Value SparkArray(i, 1) = ActiveCell.Offset(0, 1).Value SparkArray(i, 5) = ActiveCell.Offset(0, 4).Value SparkArray(i, 6) = Spark ' Reactiave the workbook and worksheet I am working in TempSheet.Activate
View Replies!
View Related
Handle Find Macro Error When Text Is Not Found
I have the following macro which I've pieced together which works great at clearing the cell as long as the text entered by the user is found in the specified column. Unfortunately I'm a big rookie with this stuff and I can't figure out how to handle the process/error when an entered value is not found. When ChosenRow returns with a 0 I get a Run time error '91', Object Variable or With Block variable not set. The code... Private Sub CommandButton1_Click() oldSheet$ = ActiveSheet.Name Dim ChosenRow As Long Dim loc As Variant Application. ScreenUpdating = False With UserForm4 loc = .TextBox1.Text End With With ActiveWorkbook Sheets("Reference").Select End With
View Replies!
View Related
Find Data In Column Range & Return Cell Same Row But X Columns To Right
i have is 3 sheets in the same excel document. Sheet 1 is the mater sheet, which is a compilation of sheets 2 and 3, however the sheet layouts are different. The sheets consist of a list of names and details. Sheet 1 has all the names in the list, however sheet 2 and 3 only have partial lists that are in a different order from the original list. The details listed next to the names in sheets 2 and 3 are different and hence a straight forward row copy and paste will not work. What i need is to write a vba script that can take the name from the master list, search sheets 2 and 3 for the name and lookup the variables placed in next to the name, then update the master sheet accordingly, then continue to the next name on the master sheet and do the update again, and so on until all is updated. I have already thought about using lookup functions in excel however there is 1000 names on the list and around 60 details so it would be messy.
View Replies!
View Related
VBA Macro To Find Text, Offset Column/Row & Copy
I am in the process of writing a VBA code(I should I am fairly new to this code writing!!!).What I need to be able to do is below.(enclosed please find a output in an xls file) What I should be able to do is below: 1.Find the text "Cash(No Listing)(Monthly)" 2. Offset to the 13th Column after that 3.Select the value in this column ,copy the value 4.Go to a row above and move one column to the left i.e.offset (-1,-1) and move 12 column backwards i.e.offset(0,-12) 5.Copy the value in 3 above to this entire range 6.Repeat this process for the entire file My code is as below.Let me know where am I making a mistake. Just to let you know that this code performs the job well for the first entry i.e in the yellow makde area and doesn't do the job for any further entries .Llooks like I have some problem with the loop but not sure as to whats happening!
View Replies!
View Related
Formula: Find Number In Range & Calculate If Found
I'm looking for a formula, which says if a number is within a range, perform a calculation. I have a table of ranges (0-6000,6001-10000,10000-12000, and so on). My formula looks at the current month cumulative balance, and inserts the value into the line of the range it falls into. However, the formula now contains lots of nested "IF" statements, due to the number of ranges I have. Also, if my cummulative balance is 6005 for example, but was 5005 in the previous month, I would like to see 95 in the 0-6000 row, and 5 in the 6000-10000 row. I making a complete nonsense of trying to explain myself, so I'll attach a quick example of what I'd like to see.
View Replies!
View Related
Find String Within Worksheet & Handle Error If Not Found
this line Cells. Find(What:=searchterm, After:=Cells(1, 1), MatchCase:=False).Activate 'find pn that is stored in searchterm causes a runtime error 91 when there are no results. "Object variable or with block variable not set" Ideally, when there are no results, I would like to enter a loop, where I could provide a drop down list of fuzzy matches, but I am not sure excel can do fuzzy matches. I'd settle for just highlighting the row and moving on... any help? Option Explicit Sub Macro1() ActiveSheet.Cells.Find(What:="AES", After:=Cells(1, 1), MatchCase:=False).Activate 'find the aes part number column Dim aescolumn 'create variable for index value of aes column aescolumn = ActiveCell.Column 'set variable to index number
View Replies!
View Related
Find Name Chosen & Move Range Relative To Found Name
I want to set range a entire column,the rows are dynamic and i want to do it on all the columns in the sheet, my problem is that after i set the range(i hope i did good) i want to do a average of the range and to put the result in a new sheet on a row. I'm sorry for the mess in the code its one of my first macros Option Explicit Sub Average() Dim R As Integer Dim help As String Dim Range1 As Range Dim E As Integer Dim Avg As Integer R = 1 '/////CREATE NEW SHEET AND COPY THE FIRST TWO ROWS TO THE NEW ONE Sheets("UXP data").Select 'Sheets.Add Sheets("UXP data").Select......................
View Replies!
View Related
Find Text, Go To Found Cell & Show Message If More Than 1 Occurrence
I have a file that the user selects and when they enter a value (in this case, a job title) into the input box, my macro looks for the value in that file. If the value is there, a msgbox pops up that lets the user know that the value was found and it then goes to that cell, displaying in the next msgbox the cell address of where the value was found. I already have the code down for this part of the macro. My problem is what happens if the file has the same value more than once. Ideally, I'd like to display a message box that returns the addresses of both cells with the same value and then prompts the user to select one of these values as the value they are looking for. I am not sure if a msgbox or a msgbox and then an input box are most appropriate for this situation. Once the user does this, the macro continues. The rest of my macro is built on the cell where this value is, so it is crucial that I make sure there is at least one value selected. Any help is much appreciated. I have included a sample worksheet of what this situation might look like. Here is the code I presently have for this part of my macro. Sub GetOpenFileName() strFind = InputBox("Please enter the job title you wish to search for:", "Search for job title in this file") If strFind = vbNullString Then Exit Sub With Sheets(strSheetsMainCompProfile) If WorksheetFunction. CountIf(Range(Cells(1, 1), Cells(100, 100)), "*" & strFind & "*") = 0 Then MsgBox strFind & " cannot be found on this sheet" Else
View Replies!
View Related
Find All Row Values Selected In Multi Column ListBox & Fill Adjacent Cell
I have a listbox that has row and columns. The rows are combinations of options and the columns are Additives. After selecting a row in Listbox1, (first column are names) i would like the value of the second column to goto a specific area.... find that value and in the cell to the right of it place a "Y". The "Y" would indicate that "yes" it was part of the selection row of the listbox. Same for third column, forth, fifth and sixth. The result from the listbox is a number of Y's and N's in the result page. Then making all that were not part of selected line and equal to "N" to hide row (height = to zero). Listbox and expected result are in attached example worksheet. The attached does show the need much better then I can explain it.
View Replies!
View Related
Search Column Delete Row If Value Found
I need a VBA code that will search column H for any value that DOES NOT start with "9" (this is a character field). If it finds a cell that doesn't start with "9", I would like it to delete the entire row. It will need to repeat this process for every cell in Column H that has a value and then stop.
View Replies!
View Related
Find Cell Value Row Number & Use For Column Number
to update these values via a form in this sheet. I can find the correct row to be edited by entering a value from column A and B. The problem is if I want display the values of that row first and then change it. If I want to change row 10 data how can I bring back the value in ROW 3 AND THE COLUMN VALUE? The next step would be to do the actual update if I want to change ROW 10 to "Ooi" and a sales value of 200? This is what I have done so far: Dim myRows As Integer With Sheets("Mrt") 'Retrieve history information for row For myRows = 4 To 49 If comboxDay.Text = Range("A" & myRows).Value And textboxdescription.Text = Range("B" & myRows).Value Then textboxbedrag.Text = Range("C" & myRows).Value chkBTW_Ja.Value = Range("D" & myRows).Value txtNota.Text = Range("S" & myRows).Value End If Next End With Picture attached to show how sheet looks like.
View Replies!
View Related
|