Alpha String Formula - Remove Duplicates When Starting In Cell Going Downward

Aug 22, 2013

I have a string of letters in cell column L20 through L3019.

The letters are A, B, C, and R . No other letters.

I wanted to find out if it is possible to remove any duplicates when starting in cell L20 going downward.

For example:

L20 = B
L21 = A
L22 = A
L23 = B
L24 = C
L25 = C
L26 = C
L27 = C
L28 = B
L29 = R
L30 = A
L31 = C
L32 = C
L33 = C
L34 = R
L35 = R
L36 = B
L37 = B

In the range L20 through L37 all the letters have appeared so my goal is to create a formula where the outcome is BACR. Starting with the first letter B in cell L20

Cell range L20 through L37. Looking for the next letter which would be either A,C, or R. Since we already used the letter B. In this case it's the letter A
ABCR

Cell range L20 through L37. Looking for the next letter which is the C or R. In this case it's the letter C
CBRA

Finally range L20 through L37. Looking for the letter R which is in cell L29.
RACB

View 9 Replies


ADVERTISEMENT

Remove Non-alpha Characters From Alphanumerics With Option To Remove Numbers

Aug 8, 2009

I have found a very useful UDF for removing non-alpha characters from strings. (See below, Credit for posting to Stanley D Grom - Ozgrid post ´Removing Non-alpha Characters From Text´).

Option Explicit

Private Function RemoveCharacters(InString As String) As String
Dim intLoopCounter As Integer
Dim intStringLength As Integer
Dim intASCIIVal As Integer
intStringLength = Len(InString)
InString = LCase(InString)
For intLoopCounter = 1 To intStringLength
intASCIIVal = Asc(Mid(InString, intLoopCounter, 1))
If intASCIIVal >= 97 And intASCIIVal <= 122 Then
RemoveCharacters = RemoveCharacters + Mid(InString, intLoopCounter, 1)
End If
Next intLoopCounter
End Function

Two requests:

1. Could the UDF be modified such that any part of a string contained within brackets is also removed (e.g. "NLGA High Street (West-Enfield), EN6" becomes "nlgahighstreeten")?

2. Can an argument be added to the format of the UDF, such that numbers (0 to 9) are either included or excluded (e.g. RemoveCharacters(A1,1) where the argument ´1´ would include any numbers (0 to 9), so "NLGA2003 High Street (West-Enfield), EN6" becomes "nlga2003highstreeten6")? ´blank´or ´0´would exclude these numbers, i.e. would return "nlgahighstreeten"

View 5 Replies View Related

Remove Cell Content Based Upon Not Starting With A Word

Jun 16, 2008

I am working on a macro and, as part of it, I would like to look at column A of my spreadsheet and remove all cell contents where the text in the cell does not start with the word "total." For instance, if the text of a cell in column H is "total money" I would like it to remain unchanged. However, if the text of a cell is "George Baker" I would like it removed. I ONLY want the text in column H to be considered ... no other column.

View 3 Replies View Related

Remove Duplicates Out Of Formula

Apr 2, 2014

I have the following formula

=IFERROR(INDEX('Data - CURRENT'!$B$2:$B$2500,MATCH(LARGE('Data - CURRENT'!$BA$2:$BA$2500,ROW(A1)),
'Data - CURRENT'!$BA$2:$BA$2500,0)),"")

This worked wonderfully until a duplicate crept in to Column B. Now there is the potential for many more duplicates. Column B holds an 8 digit numerical number. I am just struggling to add in a parameter that ignores any duplicates that have been added

View 14 Replies View Related

Formula To Remove Duplicates From A List?

Apr 3, 2014

I have a list of what we call "model codes" which are is a similar format to "DFS41FC57DD728NCWRY3"

The list could be 6000 rows but may contain hundreds of duplicates and may only contain 50 different model codes

I am looking for a formula that will populate a new column (B in the example below) with only the individual codes (unfortunately the xls example I created wont upload)

COLUMN A COLUMN B
DFS41FC57DD728N3SRY3 DFS41FC57DD728N3SRY3
DFS41FC57DD728N3SRY3 DFS41FC57DD728NCWRY3
DFS41FC57DD728N3SRY3
DFS41FC57DD728N3SRY3
DFS41FC57DD728NCWRY3

View 5 Replies View Related

Formula Or VBA Code To Remove Duplicates?

Apr 10, 2014

I have a set of text in rows which includes duplicates like this:

Column A
Text 1
Text2
Text1
Text500
Text500

I then need to remove the duplicates and put them in column B. I normally use the remove duplicates button in Excel to do this but seeing as I have to do this task every day, I was hoping there would be either a formula or VBA solution which automatically does this?

View 4 Replies View Related

Extract Alpha From A String And Compare With Another String

Aug 23, 2007

I have a problems here. The problems is attached in the file. I wanna extract alpha/char from a string. Example: I wanna extract the words "(M)" with the bracket from the string "Toothbrush (M)" in column A. After extracting the (M) out, I wanna do a validation to compare the (M) in column B with another data in column C, if the (M) is same as the data called "Medium" in column c, the validation will return "Match" in the column d!

View 9 Replies View Related

Array Formula To Remove Duplicates From List

Apr 10, 2010

I'm looking for array formula that will condense a long list like this:

a
a
a
b
c
b
d

To this

a
b
c
d

View 5 Replies View Related

Excel 2007 :: Remove Duplicates In A Formula

Dec 12, 2012

How would I remove duplicates using this formula in excel 2007 ?

=CONCATENATE(Q70,",",R70,",",S70,",",T70,",",U70,",",V70,",")

View 2 Replies View Related

Finds Duplicates In Column And Adds An Alpha Character

May 10, 2009

I have a Macro that finds in Column F duplicates and adds an Alpha Character (A-Z) to the last right position in the filed.(1-12 Alpha/Numeric) .

It's set to check all rows until a specific number of rows are reached. The current code does this until intCount and intRow equals 1500. The number of rows vary in each file.

View 6 Replies View Related

Remove Duplicates Within A Cell

Dec 29, 2006

Below is a typical example of the contents of one of my cells (of which I have around 500 cells):

263,330,335,430,431,435,640,700,748,750,752,800,807,901,916,917,937,944,954,953,962,266,2038,2054,20 56,2057,2058,357, 591, 800, 802, 748, 423, 801, 570, 955, 747, 940, 800, 748, 918, 800,730,579,728,307,310,577,717,939,958,713,
332,613,640,661,690, 800, 613, 332, 434, 575, 593, 904, 943, 648, 946, 947, 2079I'd like to remove duplicate entries from this cell (per cell) e.g. "800" appears several times.

We can distinguish between each entry by the comma - but how can I get Excel to look inside one specific cell at text and remove these?

View 13 Replies View Related

Remove Duplicates From Single Cell

Jun 2, 2007

I have a column that has duplicate information in it.

An exapmle of one of the cells is:
BL, BL, BN, BOL, BOL, CP, CP, DRE, EG, EG, LM, LM, R, RE, RE, SP, SP, W, W

I want a vba macro to go thru the column and delete the duplicates in each cell.

So this one will be:
BL, BN, BOL, CP, DRE, EG, LM, R, RE, SP, W

View 9 Replies View Related

Remove Customers Starting With A

Mar 30, 2009

I need some code to add to a macro that will delete customer account names that start with an "A" in column C. Specifically it needs to find customer names starting with the letter "A" and delete that entire row.

View 9 Replies View Related

How To Increment Alpha Number String

Sep 19, 2012

I have a log that I need to number starting in cell A1, as follows:

A-0001
A-0002
A-0003

etc.

I've put this formula in A2 to try an increment it by 1, but it just replicates the string in A1:

=LEFT(A1,3)&MID(A1,2,5)+1&RIGHT(A1,2)

with the proper syntax?...

View 5 Replies View Related

Formula Or Code To Remove Values From String...

Oct 15, 2009

Having some trouble with the syntax to translate the content of a string. The string will always contain stock tickers, but the format varies. I need to normalize them into something like ticker(space)exchange code.

For example, cell 1 can contain:
ABC.EF US - I need to remove the .EF so I'm left with ABC US
ABCDEF.GH TT - I need to remove the .GH so I'm left with ABCDEF TT

The length of the part preceeding the "." will vary, as will the last two characters (the exchange code). I expect that there will always be two characters immediately after the "." which are to be removed.

View 3 Replies View Related

Keep Each String / Segment Intact Regardless Of Alpha / Numeric

Sep 27, 2011

Problem: String is broken into 2 parts within a delimeter.
Goal: To keep each String/Segment intact regardless of Alpha/Numeric.

I have a .csv file with 26 segments (commas). This file contains customer data: PO#, Order#, Carton ID, Address 1, Address 2, Address 3, etc.

I've written code to capture all 26 segments as: Input #1, Seg1, Seg2, ... ,Seg26. The variables work fine until it encounter a string with Numeric first then Alpha within the same segment.

For this example we have a string such as (...,187 Main Street, PO Box 369,...)
Seg4 = Address
Seg5 = PO Box

The Segment Variables in Input #1, get shifted when it encounters the numeric portion of the address...so the result becomes:
Segment4 = 187
Segment5 = Main Street
Segment 6 = PO Box 369.

So on my next loop when ReadLine is executed...all the variables are shifted and I can't focus on the specific segment that I need to do something to it.

It delimits when it encounters Numeric then Alpha within the string, but accepts the entire string into the variable when its Alpha then Numeric within a delimeter.

How I can keep the entire string in tact within each delimeter?

View 8 Replies View Related

Starting A If And Elseif String

Apr 13, 2007

In row 6 column O I need for the formula to look at column I and determine if the month is 1, If yes then I need for it to determine if the date is one of the following,

Day(I6)>=1,Day(I6)<=5), If TRUE Then do the following
Cells(J6)*1.04)*2080/12
If False then
ElseIfDay(I6)<=6,Day(I6)=<12, If TRUE Then do the following
Cells(J6)*43.33)+((J6*1.04)*129.99
If False then
ElseIfDay(I6)<=13,Day(I6)=<19, If TRUE Then do the following
Cells(J6)*86.66)+((J6*1.04)*86.66
If False then
ElseIfDay(I6)<=20,Day(I6)=<26, If TRUE Then do the following
Cells(J6)*129.99)+((J6*1.04)*43.33
If False then
ElseIfDay(I6)<=27,Day(I6)=<31, If TRUE Then do the following
Cells(J6)*1.04)*2080/12, but put this into column P

If row 6 Column O if the month is greater then 1 then I need the formula to do the following,
=J6*2080/12

What I am trying to do is have excel take columns O through Z look back to column I and determine which month the performance review is due in. Then I need for it to determine which week the increase rate will be effective for. So for each month the “If the month is >1” would change to 2,3,4,5,…..and so on.

In addition I am going to have the formula look at the shift and if it =3 then (J68)+1.00, but for the increase I have to have it -1.00 then J6*1.04+1.00. I will also have to create a table that holds the max rate for each grade, and then figure out the formula to figure out this new rate.

View 7 Replies View Related

Compare Adjacent Cells, And Split Alpha Numeric String

Jan 7, 2009

I have another problem with this damn address file. Column H and I have data in them that is often mixed. As shown below, I have used A and B below, but its normaly in Column H and I. I would be greatul if some could write a macro to split the data into the two columns.

Rows 2-8 is what Im presented with. I would like them to look like 11-17

Note that the number in row 8 does not match, so is left for manual intervention....

View 9 Replies View Related

Create Range Based On Starting Cell Plus A Number Sent To Formula

Mar 13, 2014

I'm using the VBA code below for a piece of code.

[Code] .....

However, I want to use this same function in another place, without the limit set on the cells that will be cleared.

What I would like to do is send the formula the cell to start at (E14), offset that by one column, and then send a number of rows. With that, create the range to be cleared.

Something like:

[Code] .....

View 3 Replies View Related

Remove Text String From A Cell?

Jun 27, 2013

I want to remove a string of text from the front and rear of a cell value and would like to do it with one formula. I have tried using LEFT,RIGHT and LEN. I would Like to use the SUBSTITUTE formula as the user can define the actual string to be removed.

I can achieve want i want using two columns i would just like to be able to consolidate down to one.I have tried nesting the formulas but i always seem to get an error.

Characters to remove
Raw data
Output

Front
dog
dogcatmouse
cat

Rear
mouse
dogratmouse
rat

Assume that the table uses stadard naming conventions for Columns(a,b,c...) and Rows(1,2,3...)

View 8 Replies View Related

VBA Loop - Remove Single Character From Cell String Then Calculate New Value In Cell

Mar 1, 2012

I have a string of text in cell A2. In cell B2 of my spreadsheet is a formula that calculates a number based on the text string in cell A2.

I want to write a VBA loop that removes a single character from the cell A2 string, then calculate the new value in cell B2. I want this loop to continue until the value in B2 falls below a set value (in this case 60).

My code so far
Sub trim_text()
Dim mytext As String
Dim myanswer As Integer
mytext = Range("A2")
myanswer = Range("B2")
Do While myanswer > 60
mytext = (Right(mytext, Len(mytext) - 1))
Loop
End Sub

This obviously does not work. In my excel table I have a formula in cell B2 to calculate "myanswer" will this work, or does that code have to be placed into the VBA code?

View 3 Replies View Related

Macro Find Parenthesis And Remove String In Every Other Cell In Col.A

Aug 21, 2009

macro find parenthesis and remove string in every other cell in Col.A
The following formula works but is tedious to apply to every other cell:
=LEFT(A3,FIND("(",A3)-2)
Data Example:
Cell Value A2 = hello world I am A2 (this is an example)
Cell Value A3 = hello world I am A2

Then Delete the entire row A2 and apply this to every other A.Col.cell with the original data.

View 9 Replies View Related

Remove String Of Numbers From Excel Cell Leaving Only Text?

Dec 4, 2013

I need to remove only numbers from excel cell - I have tried using the "constant" function but did not work. I have thousands of cells with a consistent 4 digit number like this:

1000 the rest is text

How can I remove only numbers but leave all text in the cell and then if I can trim the cell so there are not any spaces at the beginning afte removing the numbers.

View 8 Replies View Related

VBA To Highlight Cells Downward Based On Column A Number

Aug 26, 2013

I would like to highlight the cells in Column A the have numbers in them. Starting with that number shift down based on the number that many rows and highlight them.

HTMLSheet1 *AB154020842*4020843*4020844*4020845*4020846*4020847*40208483
5010909*50109010*50109011*50109012*50109013*50109014*501090153
50112016*50112017*50112018*50112019*50112020*50112021*501120222
50206523*50206524*50206525*50206526*50206527*50206528*50206529450212430*50212431*50212432*502124

View 3 Replies View Related

"Masking" Out Non Alpha Characters From A String

Jul 20, 2009

I am comparing to columns of data from MS Project using Excel. In one column are the resource names for the project tasks. In addition to the names are the designations for % utilized. So the column's data will look like this:

John Jones[15%],Mary Smith, Fred Arguello[240%].

I want to compare this column with another resource names column which will never have utilization values - only the names.

In order to do that I need to "mask" the non alpha characters out of the first string.

View 9 Replies View Related

Next Alpha Number Formula

Jul 18, 2006

I am trying to create a formula (or if VBA is better) where when a name is put into a field the next alpha mumber is created. Have attached example.

View 3 Replies View Related

How To Remove Duplicates

Sep 25, 2013

I have an excel document that looks like this: Capture.JPG

I need it to look like this: Capture2.JPG

As you can see, the batch #, document #, amount, debit and credit all duplicate based on the number of debits that appear for each document #.

View 3 Replies View Related

Remove Certain Duplicates ....

Jun 29, 2009

Is it possible to scan through column A for duplicates if found delete the row that has not got any data in either column D E or F? If Duplicates are found and neither have any data in D E or F Delete all but one of the duplicates.

View 8 Replies View Related

Remove Duplicates

Apr 24, 2008

I have a sheet that looks like this.
JOE D.02082008/28/199 H PAnnual Increase06/05/2006
JOE D.02082008/28/1995 H PReclassification06/11/2007
JOE D.02082008/28/1995 H PReclassification02/11/2008

The name is in Column F the employee Number is the 020820 and we want to only have the latest date in the last column.

So out of this data above. The bottom one with the 2/11/2008 is the one we want to keep.
And delete those other 2.

The next group has duplicate names 10 of them. But only want to keep the most recent.

View 9 Replies View Related

Remove Old Non Blank Duplicates?

Aug 12, 2013

I have a spresdsheet with a few tousand rows that is updated daily. My objective is to remove duplicates from colum C keeping always the most recent (date on colum B). Sometimes collum C will have blank cells and the rows of said blank cells can't be deleted.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved