Remove Dashes In Number Automatically
Jan 13, 2008I have a column of 1000 folio numbers and need a formula that will remove the dashes like so,
35-30-19-041-0180 into
3530190410180
I have a column of 1000 folio numbers and need a formula that will remove the dashes like so,
35-30-19-041-0180 into
3530190410180
I am needing a custom format for the following. I need a cell entry to be 1 letter, three numbers, a dash, 5 numbers, a dash, two numbers, a dash, and then two number. Example: A109-54785-13-00. The first letter will almost always be an "A."
To further complicate the matter, the entry is copied from an email and pasted without the dashes. In the above example, the number in the email would read, "A109547851300." I copy it from the email and paste it in the proper cell in the worksheet. I would like the custom format to automatically enter the dashes at the appropriate spot.
If it was all numbers, this would be easy. I created a custom format for the numbers, but when the A is included, Excel no longer treats it as a number and the custom format did not work.
Is this possible in Excel (without VBA).
I could use the custom number format I created and then later go back and add the "A" at the beginning, but that is as much work as manually adding the dashes.
Have a column containing data which may have 1-3 dashes locates within
each cell value.
Such as:
125-457A
158-857-1116
124184A-1
125-8745-22D9
458-2145-002-7
Would like to remove all the dashes "unless" the last dash to the right
is followed by a just a single digit. The results would be as follows:
125457A
1588571116
124184A-1
125874522D9
4582145002-7
On the example data, it kept 2 of the dashes in the cell values,
because the were only one digit away from the extreme right, but
removed all others.
I have a series of columns that have dashes in them and want to remove just specific dashes from the cell
Example of original 70489-344-15-001
This is what I want --> 70489-34415001
Got about 1000 of them ...
I have this script that does what i need it to do but one thing, I need the script to count the numbers as digits only and not the dashes in the format.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Intersect(Target, Range("I21:I24")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.EnableEvents = False
If (Len(Target) > 11) Or (Len(Target) < 10) Then
MsgBox "Not a valid number of characters, please try again"
Target.Value = vbNullString...................
This code below is pasted from Automatically Add Date, Time or Date & Time and uses the Worksheet Change Event
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A2:A100")) Is Nothing Then
With Target(1, 2)
.Value = Date
.EntireColumn.AutoFit
End With
End If
End Sub
It automatically enters today's date into the corresponding B cell. How do I code it so that the date is automatically removed when & if I delete the corresponding A cell?
I'm needing to import a .csv into another software and it needs the fields formatted a specific way.
The spreadsheet I've been given has columns for different departments and an X to denote if they fall under it. As an example.
Name
Sales
OHS
HR
Joe Bloggs
X
X
Bob Smith
X
John Doe
X
X
For the import into this software it needs the fields like this, the name in the cell has to be exactly the same as the column header.
Joe Bloggs
Sales
HR
Bob Smith
OHS
John Doe
OHS
HR
Is there an easy formula to scan the row, if an X is found substitute the X for the column header text and if no X in a cell delete it and shift all cells to the left within the row ?
The substitution is quite easy and I've played around with lookup or if statements to quite easily do that but the bit I'm having trouble sorting is removing any unnecessary cells in that row so only cells with data are listed in the row.
Im not strong in excel, that why Im here. So:
I work every day with big amount of item numbers and lists in excel and I need some macro or code to automatically remove rows, containing unwanted text.
Example:
MEMORY DIMM 512MB PC3200 DDR
MEMORY DIMM 512MB PC6400 DDRII
MEMORY DRIVE FLASH USB2 2GB
MEMORY MINI SD 2GB W/ADAPTER
MEMORY SECURE DIGITAL 2GB
MEMORY DIMM 1GB PC6400 DDRII
MEMORY DRIVE FLASH USB2 1GB
MEMORY DRIVE FLASH USB2 1GB
So I paste the text from my database, and want to automatically delete rows containing DIMM string. How can I do it?
p.s. is there also a way to leave only the rows I want?
i am using a set of VB codes that was kindly provided by "dr". Please refer to the link below.
Highlight-Select Start Date To End Date
However, I am facing problems on how to delete or unfill the cells that are "coloured and filled with booking reference name" (i.e. being booked by the user).
In another words, currently, once a booking is made, the blank slots would be coloured to red and would reflect the customer name in those slots (with the use of dr's VB codes).
Comes the next day, if that booking needs to be cancelled, would the user be able to "delete" that booking that was made (i.e. uncolour that slot plus remove the customer name) without having to automatically go unfill the cells and delete the text in the cells?
I would like to change a number to a letter and then drop a digit from the end.
Say my data in A1 reads 81234568, and I would like it to display in cell A2 as h123456.
from a challenged Excel user who has a cell that needs to countdown the days of the month but need the ability to automatically remove Sundays. In other words the cell needs to refresh daily to show the number of days that have passed thus far and automatically know to not include Sundays. This would just be a numerical value.
View 6 Replies View Relatedi am wanting to automaticaly remove a file from a directory when this directory is populated and move to another directory that is secure, how would i do this? just say directory 1(where it will be removed from) is s:/ddc/reports
moved too-- s:/ddc/test
test folder will be secure
I have a column of city names, some are one word and others are two or more. I am trying to take the city name and add it to another word, add dashes in between them and make everything lower case. For example:
Column 1, Cell 1 is: San Diego
I'd like it to look like: books-san-diego (books being the keyword I'd like to insert before the city.)
I have a column of data (column A) with cells that have IDs (alpha-numeric) that contain anywhere between 0 to 5 dashes. Since this column will change weekly, I want to dynamically pull only those cells that contain 3 dashes.
Example:
10648145-3026718-t526363536m
09wcg7-s1s89-wtpxm33-uu6jj0-9y8mv-v1
10658575-2349769-
I would only want to have returned 10648145-3026718-t526363536m since it contains 3 dashes. Do you know of a nifty formula for doing this? I think an array would get me the dynamic piece (so they are not spaced out).
Here is the examples of values i have
TCH1 - John Smith - I - REG - Total
AV - John Doe - D - REG - Total
what i want to do is lookup on the value after the first dash and before the second dash to get the names only ; John smith, john doe
One of my job responsibility the following up our store stock, usually we consume constant daily value form our stock, as example we used daily 200 mt of corn, 150 mt do soya bean meal and so on, I would like to creat excel sheet to deduct this value from the previous column daily automatically.
View 1 Replies View RelatedI want to type "121505" in a cell and it display 12-15-05. What formatting do I use?
View 4 Replies View RelatedI have entries that look like this - 300-7188258-1
300-8983980-5
I need to remove the dashes. I find and replace all - with nothing. that has worked for YEARS. Seems simple to me.
Today, when I do it, Excel leaves the "300" and removes everything else. I even did a CLEAN function and it still does it.
I'm trying to find a way to have excel 2003 format the data I put in a cell to auto insert dashes every five characters. I'm entering product keys for the software we have on hand, and it would be a little quicker if I could simply have excel auto format the data entered in to include dashes every five characters.
Example:
- I would enter: D5ATT3D28F6F44536489413E2 (This is a fake, non-working product key, I just typed in random numbers a letters.)
-Excel would format it like: D5ATT-3D28F-6F445-36489-413E2
I believe I have 99% of what I need. The code below has one bug. (See just the underlined text for a very quick overview. The rest is detail.)
My goal is to generate a TOC that:
1) has the VBA run from my Personal Workbook.
2) can be run in any worksheet of any open workbook.
3) can be run in a worksheet of any name.
4) will insert itself at the currently active cell.
5) has entries hyperlinking to the referenced worksheets - of any name.
Right now, I'm stuck with the last point. The macro below will generate the TOC at the currently active cell. The TOC will be hyperlinks to the referenced worksheets.
However, if the referenced worksheet contains a space, dash, or other special character then the generated hyperlink is broken. For example, if the referenced worksheet is "sheet1" then the hyperlink generated works just fine. However, if the referenced worksheet is "sheet-1" then the generated hyperlink doesn't work.
Sub IndexList()
Dim objSheet As Object
Dim intRow As Integer
Dim strCol As Integer
Set objSheet = Excel.Sheets
intRow = ActiveCell.Row 'Start writing in active row
strCol = ActiveCell.Column 'Start writing in active column
For Each objSheet In ActiveWorkbook.Sheets
Cells(intRow, strCol).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
objSheet.Name & "!A1", TextToDisplay:=objSheet.Name
intRow = intRow + 1
Next
End Sub
For example, i have some data :
123,123567
12,778
9822,1
8267,222223
then, i want to permanently remove the comma, so the result :
123
12
9822
8267
Because if i use format cells -> use 1k separator, the data actually still contain the comma (even if the looks is 123, but in the formula bar, it stated 123,123567).
I always seem to have trouble with the Find() and MID() function when used together. I try to following the syntax but it keeping erroring...
I'm trying to remove all the characters before the first non-zero number.
e.g. ABC263080 becomes 263080
PROGO0123 becomes 123
I have a basic formula =C17+'Asset Depreciation 2008 Onwards'!C24, and I want to copy it down just using the drag function. Problem is that the second reference range of cells are in rows and hence when I copy it down it doesn’t automatically update the cell references because it want to update them by column number instead of row number. IE I want it to display =C17+'Asset Depreciation 2008 Onwards'!
D24, instead of C25. Do you know if there is any way of telling Excel that I want it to increase the column number by 1 every time, instead of the row number for this part of the formula?
Image below has a 500 cells I want to delete the 12 digit number but the numbers that align to the 12 digit was in one cell so it is hard to do manually how to delete it
View 6 Replies View RelatedI have two sets of data and i would like to combine into one.
Problem is some may have duplicated part number.
My current method is copy & paste data from 2 different tab in to one and using data, remove duplicated to get what i needed.
i am looking macro code to fixing value/number from custom number format (with dot mark criteria) as my data and will be as displayed fixing (what you see if what you get)....
2004.09.000907 (custom format) --------- 2004.09.000907 (after using macro)
1998.08.000001 (custom format)----------1998.08.000001 (after using macro)
if you press F2 in the sample number will be not visible dot (.) mark..
how to make/do that the number look like using custom number but fixed (remove custom number format)..
it's possible using macro?
I found out a way to get rid of the street number from an address, but I would like the street and apartment number removed. Right now I have various formats:
Dilger Ave #61
Dilger Ave Apt 61
Dilger Ave Lot 61
I would like simply "Dilger".
way to remove a varible number of characters in a cell? My example is in cell range A1:Z1 and each cell could have a different number of characters.
Smith, Sally 5348
Jones, Johnathan 7893
Doe, Mike 2223
What I would like to do is remove the second space and the numbers that follow to get a result of
Smith, Sally
Jones, Johnathan
Doe, Mike
I am trying to remove the numbers from a cell leaving just the text.
Say cell A1 contains Blk1Crd2 I would like say cell B1 to contain BlkCrd.
And preferebly I do not want to run a macro.
My formula is not rounding properly. Cells I4, J4 and K4 all filter from the results of cell I3 divided by 3. (e.g. 10/3 = 3.333) I was able to remove the decimals in cells I1:K3, but the between formulas (I4:K4) keeps adding the decimal back, therefore this results in errors to my chart.
View 4 Replies View Related