Find Minimum Value In Column Corresponding To Specific Text
I have a table that contains various aspects of information about customer cases, and I want to replicate a user 'picking up' the case by a simple press of a button.
Users have access to only one Country, so I want to be able to search a particular column for the lowest value, but check that the Country for that row matches the user's access. If it doesn't, I then want to find the next lowest value in the column, and this is what's perplexing me??? As mentioned, I want to click a button to trigger this, and therefore want to use VBA code.
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Looking Back Through Cells In A Column To Find Specific Text(s)
In the attached sheet I need to check on the Destination in column B, and if it matches set criteria, divide the figure in Column E by 2. eg If LAX is the destination, then for any rows directly under LAX until the next destination appears, column E needs to equal column D divided by 2. If the Destination is not LAX, then Column E equals Column D. the difficulty I am having is that there can be a variety of row numbers for each destination. I am having trouble creating a formula that can basically work backwards from Row-1 in column B until it gets to a text string, and check that text string against the criteria. so it may be row -1 up to about row -9 dependant on the number of flight times available to each destination throughout the week.
View Replies!
View Related
Search & Find All Specific Text In Column
I have a column with values like this SW SW SW CO CO PD MDM I use this line of code to determine the text Set rFound = Sheets("ProductCount").Rows(14). Find(What:=sProduct, LookIn:=xlValues, SearchOrder:=xlByRows, SearchDirection:=xlNext) ProdRow = rFound.Column where sProduct contains values such as SW , CO. Now, when I use rFound to query SW, it finde me this first occuring SW. I have this inside a for loop. When it goes and queries again, it should get me the next occuring SW, not the first SW that it searched for me.
View Replies!
View Related
Find Value In Specific Column
refine this piece of code so it only looks in column 2 for a matching value. On Error Resume Next If S = "" Then MsgBox "Delete Cancelled" Else Set r = .Columns(2). Find(What:=S, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) On Error Goto 0 If Not r Is Nothing Then Application.Goto r, True If r Is Nothing Then MsgBox "That APL ref does not exist" Else Dim rowNum As Long: Rem *** ***** rowNum = r.Row: Rem *** ***** Range(Cells(r.Row, "A"), Cells(r.Row, "AH")).Select Selection.Delete Shift:=xlUp
View Replies!
View Related
Find First & Last Specific Value In Column
In my worksheet I have a column in which the cells have two possible values: "yes" or "no". In the first positions of the column there are only "yes" values, after there are some "no" values and then the "yes" values come again. Is there any function that identificates the position of the first "no" value in the column? And also the last "no" value? Attached I send a simple excel worksheet
View Replies!
View Related
Find And Remove Specific Information From Column
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 Replies!
View Related
How To Find A Specific Text And Copy This Entire Row
I tried to writer my code myself but I have a long way to go. Here is what I must do for my case: I want a macro to find the row that include a specific text (For example "SMSC") in a range (A1:A100) then copy this entire row below the cell which has the value "OTHERS". That is, if there are 10 pieces of "SMSC" so these rows including "SMSC" should be listed below the cell "OTHERS"
View Replies!
View Related
Find A Specific Sentence In A Cell Full Of Text
Could you tell me how I can find a specific sentence within a cell that contains many sentences. for example I want to find, "I am new." within a text that contains, "Hello I am Bob. I am new. I live in england." I am currently using =+FIND(AB$1,$V2) where AB1 contains the sentence I am looking for and V2 contains the cell full of sentences. However this returns #VALUE! when the sentence is not found. I want it to return null.
View Replies!
View Related
Specific Find Followed By Equation Applied And Outputted To A New Column
I have the data sheet, which is the result of another function. It produces 10 columns with numbers in each cell, there can be any number of rows, but the key is that the rows are outlined as follows. The first row has the first column number bolded, followed by the second row not bolded and then a space and a repeat of the bold cell, followed by the non bold cell. Each row fills up all ten columns. I have attached an example of the sheet. What I would like to do is create a function which says brings up a box that says "Input Row" and the user would input the bolded number of a row. From here the code would take that value entered and divide it by the inputted bolded number’s adjacent cell, to the right, aka B2 column. This value would then be multiplied by every other bolded rows second cell, B2 column, essentially giving rise to a normalization of that column. The output would then be displayed in a new column, column 11 in italics. Each row would now have its italics value corresponding to the bolded number’s row and not the other rows.
View Replies!
View Related
Search For Text In A Specific Column
I need to find a word in a column, ie. "JAN" in col D (only first found is enough, not all instances) and then display message that "January has been updated", if not found, display message "this month has not been updated". The word "Jan" will be stored in a cell, so I need the code that could pick up the contents of that cell and lookup the col D (in another sheet, ie. "MthMaster") for that word.
View Replies!
View Related
Delete Rows With Specific Text In A Column
I want to delete any/all rows from a worksheet (named UK) which have the word "VAN" in column P. I have tried using a 'For Each... Next statement' in a macro, but always get a debug box "Run Time Error '91' Object variable or With block variable not set". What am I doing wrong? my code follows Sheets("UK").Select Dim cell As Range For Each cell In Worksheets("UK").Range("P10:P200").Cells Cells. Find(What:="VAN", _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByColumns, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False).Activate Selection.EntireRow.Delete Next
View Replies!
View Related
Trying To Find Max Date In 1 Column For Selected Text In Another Column
I have 2 columns: Locations (Column A) & Dates (Column B). I want to find the most recent date for a selected Location (stored in $G$1). currently I have in C2: =If($A2=$G$1,$B2,"") copied down the column to the end of data (currently C153). Then in C1: =Max(C$2:C$153). I also have in D2: =If($C2<$C$1,$C2,"") copied down to D153, and in D1: =Max(D$2:D$153) to find the 2nd most recent date. Is there some way to condense this into just 2 cells? See attached file for example (note the columns are currently sorted by date, but that is not always the case).
View Replies!
View Related
Identify Specific Keywords (plural) In A Column Of Text
So i'm try to automate a process that I currently do using filters. Here is the problem: I have a list of text in a column (usually 700 or so entries). I need to remove any entries that contain 1 of 42 keywords. So I need a fast way to search each cell for each one of the 42 key words and flag the cell for deletion if contains anyone of the 42. example A 1 This field has keyword1 2 This field has keyword2 3 This field doesn't have any of the 42 keywords somewhere else I would have a list of keywords in a column.
View Replies!
View Related
Move Rows Based On Specific Text Being In Column
I am trying to have rows moved from (Schedule) to (Complete) in the attached workbook. The criteria to have the row moved would be the user-selected "Status" list changing to "COMPLETE" in Column G. I would like to have the row cut and deleted from Sheet4 (Schedule) once "COMPLETE" is selected from the list in Column G with rows below moving up. The row would then be inserted into Sheet2 (Complete) at the top of the list (Row 7) and rows would move down below the new entry. I would also like to have the formatting remain uniform (every other row fill)
View Replies!
View Related
Find A Minimum Query
I have a set of worksheets all of which are identical and covered by first:last sheets What I am trying to do is come to up with a minimum figure for cell G30 With the proviso that it is a minimum of 30 as some of the entries in G30 are less than that figure. =MIN(first:last!G30) is not the answer as it gives an answer of zero.
View Replies!
View Related
Find Minimum Value Corresponding To Maximum Value
I am having trouble with large data sets of rents by market: trying to find the peak rent in a time-series, and then look for the next trough rent in time. I tried using the Newsletter 3 techniques which feels like the right direction, but I am not getting the nesting right or some of the parameters in the functions. So, within each time-series I need to find the MAX value (peak rent), wherever that is in the array. Then I need to look to the right of that exact MAX value and find the exact MIN value (trough rent), whereever that is in the array (again, to the right of the MAX value). A small sample of what the data set looks like: 2008 Q22008 Q32008 Q42009 Q12009 Q22009 Q3 Atlanta771773768761749756 Austin770786784779776776 Baltimore947948949950950953 Boston1,6471,6601,6541,6481,6301,613 Chicago998998996985984986
View Replies!
View Related
Searching A Column For Specific Text To Return A Number Of Items Found
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 Replies!
View Related
Find Minimum Value From A Data Group
I have been trying to solve this problem for the past couple of weeks and I have not been able to do so. I have come to do the operation manually, and it really takes a lot of my time, so if you guys could help me, I would really appreciate it. Basically the problem is this: In column "A" I have what I call point numbers for all the data entries. In column "B" I have the station (or location) at which I vary slightly a parameter (represented by column "E") to give me a value shown in column "D" (the "Z" value, as shown in the sheet). So basically you can see that my station 0 has 11 different "E" parameters (0, -1, -2.62, -5, etc) and each of them has a "Z" parameter (390.76, 390.775, etc). What I am trying to do is to come up with a table that shows a summary of the following: A column with each of the stations (0, 20, 40, etc -- notice that I have some weird numbered stations like 411.89). Another column with the "E" parameter corresponding to the lowest (or minimum) "Z" parameter within the station range. And a final column with the minimum "Z" parameter corresponding to its "E" parameter, which is included in the station range You can see in yellow the way I have been doing this and you can see that it would take me so much time to accomplish the task.
View Replies!
View Related
Find Minimum With Criteria - MINIF
I have following problem I have some table - 2 columns - in first is text in second is value. example: A 10 B 5 C 3 A 15 C 8 D 7 A 9 I need to use formula, which shows me minimal value for choosen text. I tried matrix formula like {=min(if(text table=choosen text; second column;0}, but it's not working
View Replies!
View Related
Conditional Copy Routine: Macro To Search A Column For A Specific Text String
I am trying to write a macro to search a column for a specific text string which when found, will copy the whole row the string is in. Once this row has been copied, I then want the macro to activate a new sheet and search for the next available empty row to paste the data. Once this has been done, go back to the original sheet and find the next cell in the original column with the specified text string and repeat until the range has been satisfied. Below is the script I have that sort of works.
View Replies!
View Related
Conditional Count (Find The Minimum Value In The Range)
I am trying, without success, to create a formula that will refer to a column of data and do the following in one step: 1. Find the minimum value in the range, and then 2. From that minimum value, count back “up” the column the number of occurrences, including the minimum value, until a zero is reached. The zero should not be counted. For example, if the values in A1:A6 are 1, 0, 2, -1, -2, 1, the minimum value is -2 and the count would return 3. (i.e. 2, -1 and -2)
View Replies!
View Related
Find Minimum/Maximum Excluding Zeros
I have inherited some legacy templates (Standard, Leave and Exception) which cannot be changed. I need to summarise them (Total) selecting the earliest start and the latest finish. (Sample attached). The templates are 90 columns wide and about fifty lines deep so named ranges isn't practicle (I think). I'm running 2003.
View Replies!
View Related
Find 2 Corresponding Values & Multiple The Minimum
Look in Column A and find the cell that contains "Std A 1" and the cell that contains "Std A 2". Compare the corresponding values in Column B, and multiply the lowest value by .2 I've tried using various methods (find, if cell.value.instr) but I keep getting errors. Can anyone point me in the right direction?
View Replies!
View Related
Lookup Functions Find The Address Of The Minimum Value In That Range
I have a range of cells (say A1:D8). I wanna find the address (say $B$2) of the minimum value in that range. This command does it but it only works on a column. it does not accept a range spanning more than one column. =CELL("address",INDEX(B2:B7,MATCH(MIN(B2:B7),B2:B7,0))) this will tell me the address of the minimum value.. but in a column... I need a range of many columns. So I tried converting things to a Table.. but it never worked. basically the MATCH command is my problem. It only accepts single-column-ed ranges.
View Replies!
View Related
Macro - To Delete Whole Rows After We 'control' Find Something From A Specific Column
I am not the best at this, but we recorded a macro and we want to delete whole rows after we 'control' find something from a specific column. WHen we recorded our macro, it finds the first instance and we hightlight the whole row and 'control' 'shift' 'end' and delete all of the rows. We did this because we sorted and made sure the information we wanted to delete was at the bottom of the worksheet. we realized that each day the spreadsheet we pull from an ip address gets bigger and the row that we started from to delete starts on a different row each day. How do we get all the information to delete everyday, even when the row that Owned starts on changes? ...
View Replies!
View Related
VBA Solver: Find Minimum Value Of Cell By Changing X Cells With Constraints
I'm trying to use solver to find the minimum value of a cell by changing 5 separate cells. These cells are subject to a set of constraints that are formulae. On top of that I have a large number of these solve's to run (The spreadsheet is creating randomly distributed data to form a Monte Carlo simulation). Therefore I am referencing the formulas using the ActiveCell, Offset() function. For some reason when running this code none of the values are changed. Also I changed the UserFinish to false so I could see what solver was doing at each solve, It stops at the correct cell (one after the final cell) but without me having to confirm it each time. Here is the ....
View Replies!
View Related
Returning A Text In A =minimum Function
I have 3 columns of numerical data. In my fourth column, I would like to return the minimum value from the 3 previous columns (=min). However, instead of returning the lowest number, I would like it to return the column title (=text) of the lowest number. I haven't been able to locate a function that does this.
View Replies!
View Related
Return The Minimum In Column
I have columns of data as per below and if the data in Column A meets a certain condition I want it to return the minimum in Column B. Column A Column B BU1 5.45% BU1 7.00% BU2 10.00% BU1 4.67% BU2 3.50% So, if Column A contains BU1 I want to know the minimum of the BU1 %'s.
View Replies!
View Related
Find Text In Column & Delete All Rows Below
I am trying to create a macro that will delete everything below a certain word. The code I tried to use is the following. This produced an error: If Range(Cells(1, 1), Cells(180, 1)). Find(" Interest Expense").Row = 0 Then iStart = Range(Cells(1, 1), Cells(180, 1)).Find(" NET INCOME").Row + 1 Else iStart = Range(Cells(1, 1), Cells(180, 1)).Find(" Interest Expense").Row + 1 End If Rows(iStart & ":" & FinalRow).Delete shift:=xlUp
View Replies!
View Related
Minimum Value From Specified Column Of Range Matrix
I have a 10x10 array that represents different cities that a travelling saleperson can travel to. Rows are cities designated as i values, columns are the same cities and represented by j values. I need to use a For, Next loop to determine the shortest distance (lowest value) in a given column. The i (row) that contained the lowest value is the first city to be visted and a boolean is entered for that j=i column, showing that the city has been visited. When pulling the minimum values from the column I need to ignore 0 values where the distance is between a city and itself. I'm having trouble coming up with a loop that takes identifies the i row with the lowest value that also ignores previously visited cities and takes the boolean into account. Maybe my Excel spreadhseet will clear up what I'm trying to do, The distances were generated using RANDBETWEEN(1,100).
View Replies!
View Related
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 Part Text On All Sheets & Delete The Column
I am trying to move through the worksheets and delete all columns with "Accession" in contained in them. I have to do this with an external macro as the spreadsheet with the data is created from another program. I tried this and get an 'Object or With block variable not set' error and the debug highlights the Cells. Find line of the code. Also, the number of columns could be variable within the spreadsheet as it is compiled by the other program. Sub DelAccessionNum() Dim Wrkst As Worksheet For Each Wrkst In ActiveWorkbook.Worksheets Cells.Find(What:="Accession", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False _ , SearchFormat:=False).Activate On Error Goto Completed: Selection.EntireColumn.Delete Shift:=xlToLeft Completed: Next End Sub
View Replies!
View Related
Find Columns By Name And Highlight Them Certain Colors Based On Text In Another Column
I have a worksheet with 20+ columns. For this macro, I only need to focus on 4 of them. However, none of these columns are ever in a fixed position so the macro would need to find them by name and NOT by column position. Here they are... 1. Vacation Type (will only have a text value of either "Cold" or "Warm") 2. Vacation Started (will always have a date *x/xx/xxxx) 3. Vacation Ended (sometimes it will have a date '*x/xx/xxxx' and sometimes it will NOT have a date and will be truly blank) 4. Number of Days (currently has ALL truly blank cells) THIS WHOLE MACRO SHOULD NOT BE CASE SENSITIVE ANYWHERE Here's what I would like the macro to do... Scenario 1 - for "Cold" values Find "Cold" text values in the "Vacation Type" column "Cold" values WITH a date in the "Vacation Ended" columnIF there IS a date in the "Vacation Ended" column in the same row, put the number of days difference between the "Vacation Started" column and "Vacation Ended" column in the "Number of Days" column. The amount of days in the "Number of Days" column will determine whether these cells should be highlighted GREY or RED. A) IF the number of days difference is 7 days or less, highlight the cells in the "Vacation Ended" column and "Number of Days" column RED. OR..............................
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 All Occurences Of Text In Column & Offset To Add Data
I have been unable to get this code quite right. I want to be able to search all of column A for the string "UNAUTH O/D FEE £20.00" and when it is found, add £20 to column B, and 01/01/00 into column D of the same row. Sub feedate() Set rd = Sheets("fees") z = 20 x = 1 / 1 / 6 For i = 1 To rd. Range("A65536").End(xlUp).Row If UCase(Cells(i, 1)) = "UNAUTH O/D FEE £20.00" Then Cells(i, 2).Value = z Cells(i, 3).Value = x End If Next i End Sub
View Replies!
View Related
|