Number Store As Text & Text Date With 2 Digit Year

Dec 23, 2008

I have a macro which will import data to the worksheet, then perform some formatting on the data, then assign the month & job description based on the lookup table. The problem is that when I import in the data, the data in column B&C will be store as text instead of number and the date in column E will store a 2 digit year instead on 4 digit year which cause error to my macro. I have try to preset the column format to number, i even try to change the column format to number when i run the format macro data. But the problem is still there.

View 5 Replies


ADVERTISEMENT

Number Store As Text

Mar 15, 2014

I want to store number as text like green sign display at the top left corner.

View 7 Replies View Related

Converting 16 Digit Number Into Text?

Nov 25, 2011

I am using following formulae to convert 16 digit number to with validation that number is not exceeding 16 digits and should always start with "1" else it should give Error with 11 blank spaces

(IF(LEN(L2)+LEFT(L2)=17,TEXT(L2,"0000000000000000"),"ERROR"&REPT(" ",11))))

but when I input any number which has a value other than zero e.g. 1009510010000059 its returning result as 1009510010000050 I need validation also in the same formulae

View 3 Replies View Related

Filter Last 9 Digits From 16 Digit Number Within Text

Nov 20, 2012

I have a large file with cells filled with text (converted from a database, imported into Excel). The text is in rows of column A and always contains a 16 digit number, which is what I need. I am able to clean up this text and show only this number, but then Excel shows the last digit as a '0'.

An example of the text I need to filter the 16-digit number from: GIRO 6838657 K MAHMODBETALINGSKENM. 7062542158461684 STORNOADMINISTRATIEVE REDEN 1 ZIE DE TOEGEZONDEN KENNISGEVINGVAN VERHAAL OF CJIC.NL/VZD

I've altered some of the information in here so this is fake. The text is messy but all I need is the number.

This is the macro I use to clean up the text and leave only the 16 digit number:

Sub CleanUp
Dim e As Variant
With CreateObject("VBScript.RegExp")

[Code].....

It sort of works, but when I run it, I get this number as a result: 7062542158461680 (last digit is changed into a zero).

I've been trying to insert this line into the macro but it doesn't work: Columns("A:A").NumberFormat = "@"

How do I change the outcome of this macro into the actual number?

If this is impossible to do, I can also manage if there is a way to filter only the last 9 digits from the 16 digit number. I can work with that, too.

I use Excel XP (2002) at work.

View 2 Replies View Related

If / Then In A Macro - Changing 2 Digit Year Into 4 Digit Year

Jul 3, 2014

I need a macro where I can highlight a column and change all of the 2 digit years to a 4 digit year (actually, some of the 2 digit years are only 1 digit, e.g. "9" instead of "09").

I have an if then statement that I can use in the column after it, but I'd rather change the actual numbers in the original column, rather than adding another column (and having to keep the original, too).

The statement I had was:
=if(A1>=50,1900+A1,2000+A1)

I just copy dragged down to get the cell numbers for the rest of the column... but using A1 was just for an example, here, it's not necessarily going to be in that column. It needs to be just whichever cells I select.

It seems like it should be pretty simple, but I don't know how to word it in a macro.

Starting Column Example:
12

13

14

99

11

[Code] ......

For some reason I can't get rid of the borders...

View 6 Replies View Related

Text Based On Date Being Year From Current Date

Apr 29, 2008

I am having a problem which I imagine will be fairly simple to resolve but I can't figure it out!

Cell A1 contains a Date eg (01/01/07)

In Cell A2 I want to write a formula that says: Insert 'Warranty' if the system date is within 365 days of the date in Cell A1.

View 3 Replies View Related

Converting 2 Digit Year Into 4 Digit Year

Apr 15, 2008

I have 2 digit years (98, 99, 00, 01) that I need to convert to 4 digit years (1998, 1999, 2000, 2001). There is one year per cell. If it was simply a matter of adding 19 or 20 to the beginning of each, I could do that. But since there's a combination of both 19 and 20 that needs to be added and there all intermingled, I'm not sure how to do it.

Can a rule be written to add 19 to the beginning except if the current cell starts with a 0, then add 20? The highest year is 2008 (no 2010 to deal with).

Example:

98 --> 1998
99 --> 1999
00 --> 2000
01 --> 2001

View 9 Replies View Related

5 Or 6 Digit Number To Date?

Dec 13, 2013

I have the following dates in a column and need to convert them to the short date format:

91113 (Sept 11, 2013)
100713 (Oct 07, 2013)
122612 (Dec 26, 2012)
40413 (April 04, 2013)

Those are just some examples. When I convert these as is I get dates that are really far in the future. Some dates are 5 digit and some are 6.

View 7 Replies View Related

Store Cell Value To A Text File

Dec 19, 2006

1. Store the value in Cell A1 to a text file located in C: with name TEXTFILE.TXT (Replace the existing value)

2. Store the value to the text file as additional line item (append records)

View 9 Replies View Related

Store Line Of Text Into An Array

Dec 3, 2008

i am not good in programming.In an outlook i am trying to write a maro.

I am reading lines from a text using readLine(), how i can store each line into an array using vbscript. I write the code as follows,

While Not F.AtEndOfStream
s = F.readline
Start = InStr(s, "@")
If (Start > 0) Then
- Here i need an array, when start>0 , store that line into an array

View 9 Replies View Related

12 Digit Number Into Date/time

Nov 12, 2008

20081110120000[0:GMT]

is there a way to convert many entries of dates and time entered in the above way into actual dates and times? is it as simple as making a custom format? if so, whats the syntax?

the entries appear to be the year(4 characters), the month (2 characters), the day of month (2 characters), and the time of day (6 characters, AM/PM)

i dont need the time, so the last part ("120000[0:GMT]") isn't necessary.

View 9 Replies View Related

Transfer 8-digit Number To Date

Nov 21, 2006

I have an 8-digit number like this :

06152002

06 = year 2006
152 = day number 152 in the year
002 = sequence of entry

Is it possiable to transfer that number into date in one cell and the sequence of entry in another cell ?

View 4 Replies View Related

Loop And Find Text In Active Cell Then Store To Array

May 5, 2012

I am trying to loop through column A and I want to store in an array where I find "App" within the cell value. I am trying to find "App" but will store the whole cell value in the array. I could not figure out the Find method, so I tried the MID function but am having no luck.

Here is my code:

Code:
Sub Arraytest()
Dim arr As Variant, lastrow As Long, i As Long, f As Long, l As Long
f = 0
lastrow = Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
ReDim arr(1 To 1, 1 To lastrow)

[Code] .....

View 1 Replies View Related

Convert 4 Digit Numbers To Text Value

Feb 21, 2014

I have a column that contains 4 digit numbers that I want to convert to a text value. Here is my example

Number Text Value
7004 RBPA
7002 DCVA
7001 PVBA
.....etc.

There is a total of 10 different number values. I want to include the conversion vba into an existing macro that is performing other functions on the spreadsheet.

View 1 Replies View Related

Increment Last Digit In Text Cells

Aug 13, 2009

I've got a column of IP addresses and want to increment the last octet. Starting with IP block in column A, I select those and drag to auto-fill to the right. Some cells increment and others don't. I'm using Excel 2003 on Windows XP.

View 3 Replies View Related

Seperate 2 Digit Number Into 2 Single Digit Numbers

Apr 3, 2008

I know you can take a number from one cell and combine it with number from another cell and make it one number. What I need to do is the reverse. Take a two digit number in a cell and separate it into single digits in two cells. If you have the number 50 in a cell, then is there a formula that will take the 5 and put it in cell and take the 0 and put it in the cell beside it?

View 4 Replies View Related

Remove The Last Digit From Each Number, Turning It Into A 5 Digit Number

Mar 2, 2009

I have a column of 6 digit numbers in excel, and I need to remove the last digit from each number, turning it into a 5 digit number. No rounding, just simply remove the last digit. Each number is different. Does anyone know how to quickly and efficiently remove the last digit from each number? I can convert to alphanumeric string if need be...

View 4 Replies View Related

Date Appears As Number When Add Text To The End?

Jun 9, 2014

I am trying to have my cell show a range of dates, like:

5/25/14 - 5-27/14

I'm trying to use a formula like:

=DATE(2012,5,9) & " - " & DATE(2012,5,9)+2

But when I do this it just appears as:
41038 - 41040

Is there any way to tell excel to format these as dates?

View 2 Replies View Related

Convert Date To Text Day Number?

Sep 17, 2006

Wondering if there is a simple and concise way to convert a date into text that represents the day number?

So a cell containing “17/09/2006” simply reads as “Seventeenth”, 18/09/2006 becomes “Eighteenth” and so on...

View 3 Replies View Related

Two Digit Year Changes On Import

May 31, 2006

I am importing data from a .csv file. The file contains dates like 02/15/40. The year is 2040, not 1940. Excel doesn't seem to use the Control Panel -> Regional Settings change when I open this file. I have my Regional Settings set to 2000 => 2099 to change to a two digit year. If I open a blank worksheet and type in 2/15/40 in a cell...Excel does the correct conversion to 2040. However, when I open a .csv file it considers it 1940.

View 2 Replies View Related

Extract 4 Digit Year From String?

Aug 5, 2013

So I want to extract the four digit year found in several strings, for example:

A1: Toyota Camry 1997 Replacement Engine ...

In b1 I'd like to return: 1997 ...

View 7 Replies View Related

Excel 2003 :: Convert Specific Date Text To Number?

Jun 20, 2014

I want to use a formula, in another cell, to convert ā€ˇ"Friday, ā€ˇ30 ā€ˇMay ā€ˇ2014, ā€¸ā€ˇ3:47:16 PM" to a value. I am using Excel 2003.

View 2 Replies View Related

Extract Fraction From Text Without Converting To Date Serial Number

Jul 16, 2009

I have a cell with the following text in it that is being imported from a website "5/1 Smith T win". What i want to do is extract the "5/1" part without it being in the format of a date. I want it to be extracted in the format "?/???". I have entered the following formula to extract the "5/1"

View 2 Replies View Related

Date To Week Number & Year

Oct 9, 2007

I've done a search on here to find out how to convert a date to a week number & found this: - =WEEKNUM(A1) which works fine, But I also want the result to display the year.

So 08/10/07 becomes WK40-07

I can't see how to do it!

View 5 Replies View Related

Check 4 Digit Fiscal Year Is Entered In A Cell

May 6, 2009

This is my code. It is for checking that only a 4 digit fiscal year is entered in a cell. The code works fine except it only checks a max of three time. So if the user enters xxx it will prompt for a correct response three times, if xxx is entere a 4th time then that value appears in the cell. I was wondering why this is taking place.

Here is my

View 7 Replies View Related

Check Digit For 8 Digit Number

Jun 13, 2014

How to calculate a check digit in excel. The details to calculate this are as follows:

All variables in the calculation are positive integers.

We take each integer of the pro number and multiply it by a value and sum them to get a total.

An Example: 8 Digit Pro Number: 66988757
Pro Number: 6 6 9 8 8 7 5 7
Position in the Pro Number: 1 2 3 4 5 6 7 8
Multiply each digit in the pro number by (10-position) in the number, to achieve a sum.

Using our example pro again:
6*(10-1) + 6*(10-2) + 9*(10-3) + 8*(10-4) + 8*(10-5) + 7*(10-6) + 5*(10-7) + 7*(10-8)
6*9 + 6*8 + 9*7 + 8*6 + 8*5 + 7*4 + 5*3 + 7*2
54+ 48+ 63+48+40+28+15+14 = 310
Take the Sum of the previous calculation and divide it by 11
310/11 = 28

(Actually, it's 28.181818, but since we're working with integers, we truncate everything behind the decimal).

Figure a remainder by multiplying the quotient by 11 and subtracting from the sum.
Remainder = 310 - (28*11) ---> Remainder = 310 - 308 ----> Remainder = 2
Check Digit = 11- Remainder
Check Digit = 11 - 2 ---> Check Digit = 9
Note: if the check digit is 10 or 11, need to subtract 10 from the Check Digit.

View 3 Replies View Related

Count Unique Text Values (number With Text And Quotation Mark) With Formula

May 14, 2012

I am trying to find a formula that will count the number of unique entries there. I have tried the solutions posted on various websites to no avail (most recently:

Code:
=SUM(IF(FREQUENCY(MATCH(A1:A10,A1:A10,0),MATCH(A1:A10,A1:A10,0))>0,1))
).

The answer should be 4,457.

Ticket Number
T20110819.0527
T20110830.0339
T20110901.0060
T20110901.0060
T20110907.0042
T20110907.0042
T20110908.0186
T20110908.0186
T20110908.0186
T20110908.0186

[code].....

View 1 Replies View Related

Automatic Update Of Cell Text Based On Item Number (also Text)?

Mar 28, 2014

I have a column C with different text in cells (item's title). Column D - relevant description for each of the items. 100+ rows.

Now, unfortunately, often a spreadsheet with items is updated with many new items. So I get a new spreadsheet with old and new items mixed. I need, somehow, to import descriptions of the old items (Column D of the old spreadsheet) to the new spreadsheet from old spreadsheet. So I want excel to look for old items in column A of the new spreadsheet and, once found, insert a description in the column B from old spreadsheet.

See attachment : Example for forum.xlsx

View 3 Replies View Related

Insert Text In Front Of Text OR Number - User Defined Format

Sep 24, 2008

I can't seem to make user-defined format that puts a text in front of a number and/or a text.

Let's say I have A1: 13, A2: texttext A3: text7 and I want to format a lot of cells to "Ilike 13" / "Ilike texttext" / "Ilike text7"... ie add the same text in the front of the cell, no matter what the content is.

I did manage it seperately, with "texttext" @ for text and "texttext" # for numbers, but what's the general one?

View 12 Replies View Related

Excel 2013 :: Extract Date And Time Info From A Text Cell That Contains Text And Date And Time

Jul 19, 2014

I am using Excel 2013. Anyway, the first issue is that I need to pull a date and a time period from text. So, for example, if I see something like Sunday Prime Time 7/6/14 8:37PM, I would want to pull ONLY the "7/6/14 8:37PM" out of it. Each text box could potentially be different, so it might not always be in the same format as "Sunday Prime Time 7/6/14 8:37PM" it might only show just the date and/or the time without all the extra text i.e. 7/6/14 8:37PM. Some of the cells will have text, others might only have just the time or even just the date and the time. The only thing that I am worrying about in each cell is extracting just the date and time. If this is too much to ask of excel, I would be ok with extracting ONLY the time - 8:37PM and not the date, but I would much rather be able to get both the time and date.

THEN, onto part two of my question. After I would pull the dates and times, I need to compare them with each other. So, when I have the same date with two separate times on that date, I need to write a formula to show if those times on that date are less than 30 minutes apart. So, if I have 6 times on 7/6/14, I need to know if any of them are less than 30 minutes apart.

I would need to have the formula say something like "Problem" if the times on 7/6/14 would be 5:30PM, 5:48PM, 7:00PM, 8:00PM, 8:15PM, and 9:00Pm for example. I would like to see the word "Problem" since 5:30PM and 5:48Pm is only 18 minutes apart, and "Problem" after 8:15PM since that is only 15 minutes past the 8:00PM which is obviously under 30 minutes. The times that are more than 30 minutes apart such as 7:00PM and 9:00PM for example are more than 30 minutes apart from any of the other times that were extracted.

View 7 Replies View Related







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