Search And Delete Combinations Of 4 Specific Numbers Stored In 5 Columns?
Aug 28, 2012
I attached partial file so you can see what i mean. I pasted only a few combinations cause the file was to big and i wasnt able to attach it...there are 142506 combinations . But you can see what i mean. A VBA or a macro on the worksheet will do the job?
I have two columns of data, one with an ID # and the other one with a date. Some ID# + date combinations are repeated and I need to delete the duplicates. Here is a visual:
In the ID column of the attached excel file whenever I convert the numbers stored as text to numbers it results in a weird transformation.
e.g. an ID of 480610141001 becomes 4.8061E+11. When I do the same process in the name column, which has similar numbers, it will give the correct result following the same process.
I have been looking through the forums and found the below code, but I have both text and numbers in the same range. I have attached an example of what I need to have converted.
I'm looking for the VBA command for this function. I tried just recording a macro in where I perform the task but it didn't record anything. Tried it several times even.
I am trying to create the ability to search for a word in specific columns. In my case below I want to search D5:E500 but it's not working. It searches the whole ppage.
Private Sub searchfind_Click() Dim searches As String searches = searchfirstname & searchlastname If WorksheetFunction.CountIf(Range("D5:E500"), searches) = 0 Then Exit Sub End If Cells.Find(What:=searches, After:=ActiveCell, SearchOrder:=xlByRows, SearchDirection:=xlDown, _ MatchCase:=False, SearchFormat:=False).Activate End Sub
adapting the bolded code to search for a specific row where the date displayed in "DAT2" (a date in Column A) occurs in the same row as specific data (e.g CEF1) in column B (note that there will only ever be one combination like this on the worksheet but it could occur in any Row) and then display just that result in "Experimental".
Private Sub CommandButton1_Click() Unload Me Dim CellFound As Range Dim Rng As Range Dim Wks As Worksheet If TextBox1 = "" Then MsgBox "You must enter a Date to Find." Exit Sub End If
I have Column Headers in Row 1 (except column A), What I need to do is write a Macro or some code to
1.Search the entire row 1 for column headers containing the suffix _CSV and delete the entire columns. 2.Shift all remaining columns to the left so no blank columns exist. (There is a time stamp in row A that I wish to keep where it is.)
Next I would like a separate routine to sort the columns in the order of a Pre-defined list that I specify in a range. For example the list of column headers reside in the Range (A1:A200)
The list is much longer than this. I need a formula or whatever that would scan both lists and say, nothing matches, or 1616781 matches or highlight the matches or whatever, just so long as I don't have to go down the entire list multiple times.
I would have downloaded Htmlmaker and provided a glimpse that way, but the web site is blocked here at work.
I have created a desk planning spreadsheet in excel. Each week a mailmerge sends out an email to everyone in the office asking them to confirm when they will need a desk in the next week.
As the normal employee doesnt get involved in desk planning I want them simply to state whether they will be in the building or not by entering "GH" (our building) in a cell under each day in the email they get sent.
When the reply comes in we select the cells from the email and then paste them into the desk planning spreadsheet. -----
WHAT I NEED TO DO: Select some cells (must be in the same row - that we have just pasted in). Press a button on the Worksheet labelled "Auto Assign Desk", which does this:- For each cell that contains "GH", replace with the right-most cell to the left of the selection that starts "GH_"... (this is the start of a unique desk reference (GH_1_1, GH_1_2,etc.) -----
This will assign the employee to the desk they were sat at last, when they are in the office next week.
When I use the SUMIF(S) function and a criteria range that has numbers stored as text (eg: '394) the unequal operator (<>) doesn't work.
=SUMIFS(B:B,C:C,"<>493") doesn't work
I'm able to get the salary of employee 493 by using "493" instead of "<>493", but it seems that with the unequal operator Excel starts treating this ID as number. The only work-around I found so far is to use a wildcard e.g. "<>*493" or "<>493*". Excel then treats it as text again, but this is dirty workaround. What happens if an employee with an ID e.g. 1493 shows up!?
"<>'493" or something doesn't work unfortuantely..
I have a workbook in Excel 2003 with two spreadsheet, a data sheet and a summary sheet. The data sheet contains account numbers in column A and monthly values from column B to M (April to March) for each account. Account numbers occur more than once in column A.
The summary sheet contains each account number as in the data sheet, but only once with a month column and a YTD (year to date) column. Part of my function is to report on a given month number as well as a year to date number as at that given month. For example if it is May, I need to report the results for May as well as April and May totals. Cell C 1 contains the value of the particular month (say month 1 equals April and month 12 equals March).
I need a formula or function to return the year to date results given a certain month (cell C1) for each account number. The sumif function does not help since it only returns values for 1 column. I need the formula to perform a sumif function but if I put in 2 in cell c1 I need the formula to add the values in columns B and C, if I put a 3 in cell C1 I need the formula to add the values in columns B, C and D.
In a spreadsheet I have a text column with entries such as: 2012 10 Times 10.5 Times 101 Times 25 Times A Pure Text Entry
When I sort by this column I expect to get: 10 Times 10.5 Times 101 Times 2012 25 Times A Pure Text Entry
Instead I get the 1st order. Why? I've selected 'Sort numbers stored as text' separately so it shouldn't be treating 2012 as a number. Besides I've checked & the cell formatting is Text.
My Excel program (Excel 2010) currently has several columns and each column looks for and pulls data from a specific file on my computer. Then I need to delete any duplicate data entries, count the number of unique entries and track the changes through a chart. I have everything done except I cannot figure out (or find on the internet) a way to search in multiple columns (more than 2) and delete just the duplicate cells. I want to delete the cells in a way where there is one left. For example if the code 12gf is duplicated three time, I want to be left with one 12gf (it doesnt matter what column the original one is left in). Additionally, column length changes and they are not sorted. I have attempted to attach an image of an example file below.
I am trying to detete rows that have several specific values, upper and lower case, (A-H) in any of several columns (B through H). I can delete upper and lower case "D"s in column B, but I'm having difficulty stringing together several variations and getting at the "D"s that are midstream (such as: ADeC), I tried ("*D*") to no avail.
With . Cells(Lrow, "B") If Not IsError(.Value) Then '**** If LCase(.Value) = LCase("D") Then .EntireRow.Delete
I am using an ODBC database connection to input data into an excel file. When I input the data excel stores the numeric data as text and puts a ' in front of the number. There is an exclamation mark beside the cell which allows me to convert the data back to numeric format. I need excel to do this conversion for me automatically when new data is added to the file.
There is probably a really easy answer to this question but I cannot seem to figure it out. I need to calculate the sum of pages faxed on a fax report at my office on an excel spreadsheet which is downloaded from our server. It appears the file is not meant to be used in excel but it downloads as an "*.xls" file anyway. When I open the file I receive this message:
"The file you are trying to open, 'FaxCetailReport.xls', is in a different format then specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"
The file is comnig from a trusted source so I select "Yes" and it opens just fine. There are just over 50 rows of info, one of them being the number of pages. In a blank cell I enter "=SUM(select rows)" and the result is a "0". I have converted the cells to the "number" format, no change. When I right click on the cells and select format, the protection tab on the right has the check box "Locked" checked and unchecking it does nothing, it is checked as soon as you go back in to the protection tab.
The only way around this is to manually retype the numbers in a cell next to the pages column, which is ok for 50 numbers, but I have some sheets where there is over 1,000 entries.
I want to know how I would write/format a spreadsheet that would tell me what are all the possible outcomes between the two numbers and what the components of these two numbers would be.
For example.
(8 * .32) + (3 * .33) = 3.55
So somewhere I would be able to see that in order to achieve 3.55 I need (8) .32 stamps and (3).33 stamps
Lets say I have 10 numbers (1,2,4,5,6,8,9,12,19,13). Now, I am trying to get a list of all possible combinations (single digit, two digit, 3 digit, 4 digit... 13 digits).
Assume that the 10 numbers (this is a variable, it can sometimes be 9 or 11 etc) are in column A and I want all the possible combinations in column B.
I want to output every combination of a set of numbers. These permutations must include combinations that use only a few of the numbers as well as all eight...ie.
1, 1,2 1,2,3 as well as 1,2,3,4,5,6,7,8
The macro below is from http://www.j-walk.com/ss/excel/tips/tip46.htm This only produces combinations using every number. I'm not sure how this macro works but hopefully someone with better know how could run with it or break it down for me!
I only need to achieve this once but am pretty sure doing it manually will cause error and or madness
Dim CurrentRowSub GetString() Dim InString As String InString = InputBox("Enter text to permute:") If Len(InString) < 2 Then Exit Sub If Len(InString) >= 8 Then MsgBox "Too many permutations!" Exit Sub Else ActiveSheet.Columns(1).Clear CurrentRow = 1 Call GetPermutation("", InString) End IfEnd SubSub GetPermutation(x As String, y As String)' The source of this algorithm is unknown Dim i As Integer, j As Integer j = Len(y) If j < 2 Then Cells(CurrentRow, 1) = x & y CurrentRow = CurrentRow + 1 Else For i = 1 To j Call GetPermutation(x + Mid(y, i, 1), _ Left(y, i - 1) + Right(y, j - i)) Next End IfEnd Sub
I need to be able to create a list of all combinations (where position doesn't matter, therefore its not a permutation) of a list of numbers with repetition enabled. I need to provide anywhere up to at least 10-15 numbers if possible and they are integers normally between 1 and 72. Example: (for numbers 1, 2, 3)
Am looking for an easy way to produce a list of combinations (maximum 6 numbers) from a range of numbers listed in 6 different columns:
Example Column A contains : 1,2,3 Column B contains : 7,8,11,15 Column C contains : 12,16,18,19 Column D contains : 17,30,31 Column E contains : 30,31,32,33,34 Column F contains : 37,39,40 The rules are:
In each combination of 6 numbers, numbers should always be taken from ALL 6 columns. In each combination, numbers cannot repeat.
I have 2 different sets of data: temperature data recorded at meteo-stations defined by latitude / longitude, and major world cities also defined by latitude / longitude.
After the user chooses the station's coordinates, temperature data is pulled out from the first data set; this works! However, I would like to be able to provide information about the closest city to the chosen meteo-station from the second data set.