Formula: Last X Characters, Text Or Numeric

Dec 7, 2006

I am trying to write a formula that will recgonise either text or numicial value as the result is used with a match formula. In column C I have data as follows:

1400 SBY
1230 9985
ADO

I am using a =--RIGHT(C4,4) formula in column E to get the required data and then using my match formula to extract other data. How can I rewrite the above formula so that it can read either text or numbers that will allow my match formula to work.

View 5 Replies


ADVERTISEMENT

Explanation For Formula That Counts Number Of Numeric Characters

Nov 21, 2012

The formula below was posted recently as a way to extract a numeric substring from somewhere in larger string. When I first saw this formula, how it "came up with the goods" and so I spent some time looking at parts of it to see what they did.

Although I've made some progress, I still don't fully understand it. Heres the formula, and below Ive detailed how far I've got:

=Iferror(lookup(9.99e+307,--mid(a1,min(find({1,2,3,4,5,6,7,8,9,0},a1&1234567890)),row(indirect("1:"&len(a1))))),0)

I hope my findings below are correct:

1. The formula is returning the first substring of contiguous numeric characters from the full string in Cell A1
2. 9.99e + 307 ensures that the search value won't be exceeded by the returned value.
3. The Mid function uses Min(Find( to get the character position of the first numeric in A1 (so MID then has its first 2 parameters). So far so good.
4. Now... I cant work out where MID parameter 3 (the substring length) comes from. I suspect its the row function, but can't see how as this isn't an array formula, and without CTRL+Shift+ Enter, I could only get Row to return 1 in my experiments (giving me only the first substring digit).

How does the formula return the correct number of numeric characters, (apparently) without counting them?

View 3 Replies View Related

Text Formula? Postcodes: Seperate The First Or First Two Text Characters From The Rest Of The Postcode

Feb 16, 2007

I am working on sales information which includes postcodes. What i need to do is seperate the first or first two text characters from the rest of the postcode. I have attached a small snipet of what i am working on. Currently i am using the =Left(A4,2) but this will give me in some case a numerical value aswell. For example E1 or G1 in the case of the sample attached. Is there a formula that exists where it will just return the text values in a cell and not numerical values.

View 6 Replies View Related

Copy Text To Cell And Convert To Numeric Formula

Feb 15, 2014

I have a spreadsheet where I enter text values in a cell, e.g. (.5 x .5) x 2 x .009. I want to find a way to automatically populated the cell to the right with the formula version, e.g. =(.5 * .5) * 2 * x .009 and format as three decimal place number.

One other question, is there a way to enter a template for entry in a cell. It would be nice if the text value above would take care of the parenthesis and multiplication signs for me.

View 3 Replies View Related

Data Validation For Mixed Numeric And Text With Formula Only?

Feb 22, 2012

Is it possible to validate a string with both numbers and text with a formula using data validation? (I don't want to use a User Defined Function)

in Column C, Starting in cell C2 I have a 12 character string of six numbers, four letters, and two numbers. like this:

280838ZNOV11

is it possible to use a Custom Data Validation formula to ensure the user follows this format?

View 9 Replies View Related

Getting Rid Of Every Non Numeric Characters

Jan 13, 2007

I have a cell that contains BYO CUSTOMER XYZ 76458992

I want the cell next to it to remove all of the letters and display only 76458992.

View 9 Replies View Related

Extract Numeric Characters

Jul 1, 2009

I have a column contains Postal Adress in more than 5000 rows. Column contains Door Number, Area, City and Zip code. I need to separate "Zip code" alone in next coulmn. Zip code (of India) will be in six digits like "600083" also some cases contain space in middle of zip code like "600 083" (after 3 digits). Is there any way to do this without doing cut & paste?

View 9 Replies View Related

Extract Set Of Numeric Characters

Jul 3, 2009

I have a column contains Telephone numbers with or without area code and country code for across the country (India). I need to extract the telephone numbers alone (neither area code nor country code). Telephone numbers will be 6 or 7 or 8 digits (not more than that). Is it possible to extract any set of numbers contain 6 or 7 or 8 digits continously? Some of the cases contains 2 contact numbers (2 set of 6 or 7 or 8 digit characters, between special characters will be there like slash, comma, space, hypen, etc.,

Here are some examples: ....

View 9 Replies View Related

Check If 1st X Characters Are Numeric

Aug 10, 2007

In my column of text strings, I have a multiple format of strings make-up. Below is just one of them I have to check that the first 6 are digits from 0 to 9, and it is followed by a hypen. If condition is true, the first 6 digits is the output (ie. 345678).

345678-S

=IF(ISNUMBER(--(MID(A1, FIND("-",A1)-1,1))--(MID(A1,FIND("-",A1)-2,1))--(MID(A1,FIND("-",A1)-3,1))--(MID(A1,FIND("-",A1)-4,1))--(MID(A1,FIND("-",A1)-5,1))--(MID(A1,FIND("-",A1)-6,1))),LEFT(A1,FIND("-",A1)-1))

However, if I were to continue doing this for other strings, I would soon run out of characters limit that is allowed in a cell. I wonder whether a formulae such as below is valid? Any suggestion or help for a shorter formula is very much appreciated.

=IF(ISNUMBER(--(LEFT(A1,1+1+1+1+1+1))),LEFT(A1,6))

View 4 Replies View Related

Remove All Non Numeric Characters

Oct 16, 2007

The macro I have select 2 columns and 2000 rows. I need a VBA code that will loop through each of these 4000 cells and remove all characters (replace them with blanks) that are not a number, a period or a decimal. Characters from other languages like Chinese, Japanese and Russian should also be removed.

View 3 Replies View Related

Trim Numeric Characters After The Decimal

Feb 24, 2009

I have something simple (i think) but i cant think it through. I have a range of cells that are populated by a link and so even though the value shows #,### It really shows #,###.########

I would like to trim everything after the decimal point without having to adjust format of the range since some cells are general format and others are Percentage format but they all suffer from .####### HOWEVER, the last digits are variable and never the exact same amount of characters.

for each cell in range("C4:J9")
if cell.value "" then
Trim(Left(cell,4))
end if
next cell

View 9 Replies View Related

Extract Numeric Value Based Upon Ending Characters

Jan 10, 2014

I have a list of numbers in which I need to return the last 5 digits; the length of the string may vary.

However, if the last two digits of the number ends in a specific value then it should skip over the last two numbers and return the preceding 5 digits.

I have tried and have used the very basic Left, Right and Mid functions. My problem is I dont know how to code the formula to identify the last two digits and skip over them, if necessary.

I have provided an attached example.

Extract numeric value based upon ending characters.xlsm

View 5 Replies View Related

Format Some Numeric Characters In Cell As Subscript

Feb 16, 2010

I thought I had this solved but an inconsistency has shown up. I have a long list of chemical formulas that I want to format (partially) as subscript.

Basically what I need the macro to do is look at each character within a cell and check to see if it is numeric. If it is AND it follows a non-numeric character it should be formatted as subscript.

Examples
H2O the 2 should be subscript
H2SO4 the 2 and the 4 should be subscript
2CCl4 only the 4 should be subscript

View 2 Replies View Related

Format Specified Numeric Characters In Cell As Subscript

Feb 16, 2010

I have a long list of chemical formulas that I want to format (partially) as subscript.

Basically what I need the macro to do is look at each character within a cell and check to see if it is numeric. If it is AND it follows a non-numeric character it should be formatted as subscript.

Examples
H2O the 2 should be subscript
H2SO4 the 2 and the 4 should be subscript
2CCl4 only the 4 should be subscript
CuSO4 - 5H2O

View 2 Replies View Related

Formula To Split Text Into Groups Of 30 Characters But Control As Well

May 28, 2014

I have previous been given the below macro from here that splits a string of text in one cell into groups of 30 and then puts them into several cells, works perfectly.

What I would like to incorpate now is the ability to overide the point at which it splits the text.
i.e. if the inputter puts a "|" (for example) in the original text, this will cause a split in the text and it will restart its 30 count from this point onwards.

Example of what I would like to achieve:

Cell A1 = I would like to change this string of text into groups of 30, where this appears | I would like it to start a new split of 30s from this point on wards and again if another one of these | appears in the text.

Cell B1 = I WOULD LIKE TO CHANGE THIS
Cell C1 = STRING OF TEXT INTO GROUPS OF
Cell D1 = 30, WHERE THIS APPEARS

[Code]....

View 2 Replies View Related

Sort Values Which Has Numeric, Spaces And Capital Letter Characters

Oct 8, 2009

I would like to sort words or data which has the First capital letter, words which has spaces and words which contains number... i have attached a sample file.

View 9 Replies View Related

Returning Text Values From Text Or Numeric?

Jun 4, 2012

I have two (2) different values in the same column one value is text (INV) the other is a time date stamp 05/18/2012 10:48:32. The text i want to return in a seperate column for these two is if it is INV then the result is "PENDING" if it is a date 05/18/2012 etc. then the result would be "PAID" example:

Payment Status
05/08/2012 10:30:12
INV
05/17/2012 08:27:37
INV
and so on...................

View 9 Replies View Related

Validate Cell For Text Length & Characters In Text

Mar 13, 2008

I have a cell (B2) I would like to apply multiple data validations to.

I know I need to use the custom formula option but don't know how to write the formula.

I don't even know if it is possible, but here is what I'm after

I need to make sure the cell is 4 digits long

I need to make sure the cell starts with a zero (Because the cell starts with a zero I have it as a text cell)

I need to make sure the 2nd number is not 0 if A2 begins with 5 (A2 is also a text cell).

View 6 Replies View Related

Counting Text Not Numeric

Jul 12, 2014

apple
banana

Assume above on cell a1 and a2

What is the formula on cell a3 to count these, I know count(a1:a2) that counts numeric, don't know how to deal with text count.

View 14 Replies View Related

Convert Text To Numeric Value?

May 9, 2014

Wondering if it is possible to convert a string into a numeric value. The idea is that if you have a list of names, if you could add up the numeric values of the names together and hide it at the end of the list. Then if a name on the list changes, then so will that value.

I know how to do this in C or Python, but I am rather new to the syntax of VBA.

View 12 Replies View Related

Numeric To Text Conversion

Sep 7, 2006

I often use vlookups that fail because of numeric/text discrepancies. I was always taught that if you're not going to do math on a field, it should be text. Such as zip codes or social security number.

Anyway, I know the easy way to convert text to numbers is paste special > multiply by 1. But what's the easiest way to convert numeric to text?

View 6 Replies View Related

Reading Non Numeric Text In A Cell

Apr 1, 2009

SUM(IF(FREQUENCY(E10:E29,E10:E29)>0,1)). this is the formula I currently use to read employee numbers and it works when we just use the number i.e. 011004. When we use the full employee number with alpha characters it does not work i.e. ASMO011004. I have used helper cells to do similar, but am not wanting to do this way for simplicity reasons.

View 2 Replies View Related

Sorting A Combination Text / Numeric Value?

Oct 2, 2013

I have a series of identification values that begin with text and end with a number. The trouble with sorting on this field only affects where the the first 9 entries end up since the number portion is not prefixed with a zero. Is there a way to sort these numbers so that ID2 (and not ID10) follows ID1?

ID1
ID2
ID3
.
.
.
ID9
ID10
ID11

View 4 Replies View Related

Extract Numeric Value From Text String

Feb 6, 2012

I’m wanting to extract the numeric values & piece of text from the end of a text string. Example data set starting in A1;

Big Box Dom 40*20

Result wanted :
Column B1 : Big Box
Column B2 : 40*20
Column B3 : 40 x 30

View 3 Replies View Related

Convert Numeric Text To Date

Sep 6, 2012

I have some dates in Excel in different formats and I need to convert them all to a uniform date format of MM/DD/YYYY.

The data is in this format:

82012
8152012
52012
5152012

The days of the month don't really matter. It's the month and year that I need in a date format.

View 2 Replies View Related

Conditional Formatting With Text And Numeric

Mar 5, 2013

I have a spreadsheet with employee ID's along with other data, I need to see if any of the ID's are out of this range 0001 thru 1368, now some of the ID's have A,B,C, (e.I 0245A, 1101B,) but some do not have them. if the ID's are out of range I need to highlight it, cant figure this out, because of the Alpha characters.

View 4 Replies View Related

Averaging Text With Numeric Values

Feb 26, 2008

Are test have some text values RA = 0 and A= 0.5 as well as numeric values. I am currently using the formula =IF(COUNTIF(A1:A13,"A"),(COUNTIF(A1:A13,"A")*0.5)+SUM(A1:A13))/COUNTA(A1:A13) which is not very good at all, but it works for this instance. I also use the formula in B2 =IF(A1="RA",0,IF(A1="A",0.5,A1)) as a helper column but I need a stabile formula with out a helper column that will allow me to average text and numeric values. In the future, they are going to expand the text values part i.e. B = 0.3, BD = 0.2 etc....

View 9 Replies View Related

Extracting Text Before And After Numeric String

Jul 31, 2009

I'm trying to extract alphanumeric data before and after a numeric string. The numeric string is in the middle of a URL, which is a varying distance from the start and end.

Here's a sample of my data:

URL Page ID Headline Section quiz.impression-http://www.stuff.co.nz/2677193 2677193

http://www.stuff.co.nz/travel/267779...flying-JetStar 2677794 Why-I-hated-flying-JetStar travel http://www.stuff.co.nz/technology/di...eo-a-smash-hit 1675213 Wedding-dance-video-a-smash-hit technology/digital-living http://www.stuff.co.nz/national/crim...ce-in-Auckland 2678248 Man-shot-by-police-in-Auckland national/crime http://www.stuff.co.nz/sport/rugby/s...it-for-Blackie 3674350 NZRU-set-to-bend-it-for-Blackie sport/rugby/super-14

I start with just column A and generate the other three from that.

I'm using some excellent code from a Mr Excel guru (thanks again Peter) to extract the 8-digit numeric string in column B, I just need C (after) and D (before).

That macro is:
Dim Bits
Dim c As Range
Dim i As Long

For Each c In Range("A4", Range("A" & Rows.Count).End(xlUp))....................

View 9 Replies View Related

Remove Comma From Text To Numeric

Jan 13, 2010

I need a simple way to extract the comma in 14,656 imported text so I can do a vlookup against 14656.

View 9 Replies View Related

Using Sum Product On Cells With Numeric And Text Values

May 29, 2013

I'm trying to find out exactly how I can use sum product on cells that have text and numeric values. Here's my sample data (6 points):

TN FX1576 20, TN FX1577 25, AZ FX1577 30, AZ FX1577 35, FW FX 1577 40, and FW 1577 45.

I wish to do the following: I want to sum all of the right numeric values based on the first two text values(TN, AZ, or FW). I want to sum these numbers to their respective total cells at the top of the page. So far I can sum the numeric values fine using the following formula: =sumproduct((right(range,2)*1) but when I try to differentiate between the respective locations (AZ, TN, or FW) I get an error message.

Attached is an example of what I'm trying to do along with the formula I'm currently using and yellow shading to represent where I want my respective sums to go.

ExA.xls

View 1 Replies View Related







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