How To Remove Text After The Second Instance Of An Asterisk?

Jun 18, 2009

I'm trying to convert variable length strings which are being copied from a display and loaded into an array.

I have it working fine for the majority of the data, which comes in looking like "*ABC@US" or "*AABC@US"

However, some of the data looks a bit different, particularly lacking the @ symbol. So what I end up with is

"*ABC US*ABC US*ABC US"

What I need to get to is just "ABC US" FYI the US part can be 1-5 characters.

SO... I need a way to truncate anything after the second instance of the asterisk. Haven't been able to get it to work using various trim, mid, len, left, right, etc functions.

View 9 Replies


ADVERTISEMENT

Remove Asterisk From Cells

Sep 6, 2007

I have data in column "A" that contains an asterisk at the end of the cell value. The problem is, this asterisk can be any number of spaces away from the value that I want. remove this character from the cells? Data is copied from another program and the number of rows can be different from day to day.

View 5 Replies View Related

SUMPRODUCT Contains Text, Using Asterisk

Nov 9, 2009

Let's say I have two columns: Homeless (column A) & Services (column B). Homeless responses can be either "Y" or "N". Service can be "a", "b", or "ab". Here is an example:

Homeless Service
y a
y b
n a
y ab

I was hoping to use SUMPRODUCT to calculate clients who are homeless and receiving "a" service. I want to be able to calculate those receiving "a" service even if they are receiving "b" service, so I attempted to use asterisks like I have used prior with the COUNTIF function. Here is what I thought would work:
=SUMPRODUCT((A2:A5="y")*(B2:B5="*a*"))

And I expected it to return 2, but I found that I couldn't get the SUMPRODUCT to work with asterisks. I am able to get the results I want be creating a new column to sort the services into just those who are homeless and then using COUNTIF, but I'd rather come up with a more streamlined approach.

View 3 Replies View Related

Add Asterisk Symbol As Text At End Of Cell With Formula?

Nov 29, 2011

I am trying to add a * at the end of a value in a cell, used to signify a note at the bottom of the page. However, as the cell contains a formula, excel thinks I am adding a multiplication sign instead.

Is there anyway to place a * at the end of the value, to show up in the cell as text? I would prefer not to have to paste the value of the cell and then add the *...

View 3 Replies View Related

Saving A Worksheet As A Asterisk Delimited Text File?

Sep 19, 2013

I am trying to save a worksheet as a txt file. The worksheet has a range of data with a variable amount of rows in column A only. It generally will look like:

A*B*C
A*B*C*D*E*F*G*H*I*J
A*B*C*D*E*F*G*H*I*J
A*B*C*D*E*F*G*H*I*J

where each row of data is in a single cell.Whenever I save it, however, it adds extra tab deliminations in each row after the data, and it adds rows with no data (sometimes just 1, sometimes many).

I am positive that no cells in columns B-n have data in them (even just a space) and no rows after the last intended have data.

Why are these extra rows and columns being inserted? How can I save a txt file that literally has no other spaces or rows or deliminations other than what's intended?

View 2 Replies View Related

Subtract First Instance Of Data From Last Instance In Columns

Mar 7, 2014

I need a formula in Column E to find the results for Column E or subtract A2 from C3, C3 from D3, A4 from C3, B5 from D5 and A6 from D6 .

table.tableizer-table {
border: 1px solid #CCC; font-family: Arial, Helvetica, sans-serif
font-size: 12px;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #ccc;

[Code]....

View 5 Replies View Related

One Instance Of Each Value Within Text Range

Jul 10, 2014

I have a list of text cells in column A, the list is a dynamic one that changes depending on the property selected in a cell of another sheet.

Example data... Column A is Block Name, Column B is Room Number.

---------A----------------B-------
1--Main Building-------001
2--Block A--------------001
3--Block A--------------002
4--Main Building-------002
5--Block B--------------001
6--Block A--------------003
7--Main Building-------002a
8--BSS House----------BSS
9--Main Building-------003

What I need is for a formula that lists one example of each instance included in Column A.

As per the example data above, the expected results when dragging down from C1 through to C9 would be:

---------A----------------B--------------C--------
1--Main Building-------001-------Main Building
2--Block A--------------001-------Block A
3--Block A--------------002-------Block B
4--Main Building-------002-------BSS House
5--Block B--------------001-------
6--Block A--------------003-------
7--Main Building-------002a-------
8--BSS House----------BSS-------
9--Main Building-------003-------

I know I could use a pivot table to do this but as I need this to be dynamic, and also to be used with Excel on an iPad Air, I can't as it doesn't support pivot tables or VB to automatically refresh it.

View 11 Replies View Related

Search For First Instance Of Text & Return The Value

Jun 13, 2006

I have a list of product numbers in col. A. In col. O I have a list of file
names that contain the product numbers as well as additional characters. I
need a formula that will search col O for the first instance of the text in
cell A2 and return that value.

The next formula will return all instances that contain the text found in A2.

View 12 Replies View Related

Return Nth Instance Of Text String

Jul 30, 2008

I have the following formula that returns the most frequently occuring string in a range. what I would like to do is return the 2nd, 3rd 4th and 5th most common occourance as well. I am not sure if I can do this by adjusting this formula or whether that would be a completely diffent formula or worst case senario it is not possible at all.

=INDEX(B2:B1537,MATCH(MAX(COUNTIF(B2:B1537,B2:B1537)),COUNTIF(B2:B1537,B2:B1537),0))

obviously this is an array.

View 9 Replies View Related

Finding First Instance Of Multiple Text Entries

Mar 14, 2014

I have a list of names that are mixed and in no order (and need to stay out of order, so not sorting allowed). I need to parse this list to give me the FIRST instance that each name shows up in the list. The one exception is that the first name, cell A1, will be auto-generated from a different workbook, and it is automatically named Name1.

So, in the example spreadsheet, Name1 (cell E2) must equal "Alice". The problem arises on Names2-4. Name2 (cell E3) should be David, Name3 (cell E3)=Jerry, and Name4 (cell E4)=Mark. I tried an array formula:

{=INDEX(A2:A13,MATCH(TRUE,A2:A13<>Name1),0)},

But it is yielding "Jerry" as Name2, when it needs to be Name3. And, of course, this doesn't work on Names3-4 at all. I don't think it matters, but just in case, A2:A13 will be data validation lists.

View 5 Replies View Related

Macro:finding Next Instance Of Text Using FindNext Method

Dec 16, 2006

I am facing problems with finding next instance of text using FindNext method. Kindly find code belowe which i have used.

Set srcCell = SourceBook.Worksheets(1).Columns("A").Find("Risk", After:= Sheets("SubArea"). Range("A21"), LookIn:=xlValues, lookat:=xlWhole)
'Set srcCell = SourceBook.Worksheets(1).Columns("A").FindNext
Set firstsrccell = srcCell
Do While Not (srcCell Is Nothing)
tgtCell.Offset(tgtRow, 0) = srcCell.Offset(-1, 255)
tgtCell.Offset(tgtRow, 1) = subAreaId
tgtCell.Offset(tgtRow, 2) = srcCell.Offset(0, 1)
tgtCell.Offset(tgtRow, 3) = srcCell.Offset(1, 1)
tgtCell.Offset(tgtRow, 5) = srcCell.Offset(3, 1)
tgtCell.Offset(tgtRow, 6) = srcCell.Offset(2, 1)

Set srcCell2 = SourceBook.Worksheets(1).Columns("A").FindNext
' If firstsrccell.Address = srcCell.Address Then
' Exit Do
' End If
tgtRow = tgtRow + 1
Loop

I checked above code by putting breakpoint, but code is unable to find next instance where it matches the required string (FindNext reamains at the same position).

View 9 Replies View Related

Convert Array Into Text And Remove Duplicate Entries From Text In Cell?

Jun 12, 2014

I have the following two columns, and would like to obtain for each individual Company, the corresponding Country values excluding duplicates as text in a single cell.

Company 2Country B
Company 2Country C
Company 3Country C
Company 3Country C
Company 5Country A
Company 5Country C
Company 5Country C

For example:
- For Company 2, a cell containing "Country B, Country C"
- For Company 3, a cell containing "Country C"
- For Company 5, a cell containing "Country A, Country C"

I've approached generating an array using an IF statement, as in =IF(INDEX(A1:A8="Company 5",,),INDEX(B1:B8,,)," "), which returns the following array: ={" ";" ";" ";" ";" ";" ";" ";"Country A";"Country C";"Country C";" ";" ";" ";" "}.

The question is: how do I get that array to produce, as text in a cell: "Country A, Country C". Note that the duplicate Country C has been removed.

There are a few "StringConcat" User-defined functions that I've found elsewhere on the internet, but they don't seem to be able to handle to conditionally generated IF Index array, which I would think is key to parsing between Countries corresponding to each Company in the list.

View 3 Replies View Related

Search For Text Delete This Row And Delete The Row For Every Instance

Apr 29, 2008

I have an formula if statement that returns "deletethisrow" if the test is true.

For every occurence of "deletethisrow" I want to delete the row. The number instances will be variable each time I run the file. So maybe it will find that string, maybe it will find 10 instances. I want to do some kind of loop that won't error out when it cannot find "deletethisrow", but will delete the rows for each instance where it does find this string.

I know it was verbose, but if I just do a loop for a fixed number of loops it will error out if it runs out of rows to delete.

View 9 Replies View Related

Return Text To The Right Of Last Instance Of "/"

Sep 26, 2006

I'm trying to return the string of text to the right of the LAST instance of "/" in:

"GE/MRL/DC/BILLYBOB/DANDRUFF"

So that the result would be "DANDRUFF"

how to get just that last part?

View 2 Replies View Related

Find And Replace Asterisk

Oct 25, 2013

How does one use the find and replace function in Excel to replace an asterisk? "*"

View 2 Replies View Related

Asterisk For Password Entry

Dec 1, 2006

I have an input box for the user to type in a pin number to identify themselves, I would like to make it so that what is seen in the input box is the * symbol as in most applications. I have sussed out how to do it with a text box in a form but if I use that it would mean a major rewrite of my code,

View 9 Replies View Related

Color Cells Containing Asterisk

Jun 19, 2008

I attach picture.

I need to put * and in that field appear word from above and to change field color to one of three presented colors depend in which row * is inserted.

All other fields need to be empty and white, like on second picture.

I know that is little If...Then, but I don't have so much knowledge.

View 7 Replies View Related

Saving A File To Asterisk Delimited?

Aug 30, 2013

I am trying to open up an asterisk delimited file then shrink the data, then after I want to save it back as an asterisk delimited text file. How would this be done in vba, as well as manually?

View 2 Replies View Related

Search For Special Character * (Asterisk)

Jan 2, 2008

I'm working again with a large Inventory Database dump into a workbook and in the past the company appended the * character to designate an updated price on an item(column C). Its rocking my world to sort through things with this character as you can tell. I'm trying to find rows that column C has a * in, cut, and paste them into another sheet called "Updated". I would even accept just how I'd do a simple "find/replace all" on that character and then I can just update my macro and be on my way Anyway this is the macro thus far and as you can see it would just cut all rows and paste them to "Updated".

Sub Updated()
With Worksheets(1).Columns("C")
Set c = .Find("*", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.EntireRow.Cut Destination:=Worksheets("Updated"). Range("A" & Worksheets("Updated").Range("A65536").End(xlUp).Row + 1)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub

View 2 Replies View Related

Change Color Of One Cell When Asterisk Entered In Another

May 15, 2013

I need to have the color of cell A2 change when I enter an asterisk in cell A1 to denote a critical dimension on an inspection form.

I used conditional formatting to change cell A1 orange when an asterisk is entered. Is there a way to tell cell A2 to look and see if there is an asterisk in A1 and if so change it's color?

View 4 Replies View Related

Conditional Formatting On Two Columns To Ignore Asterisk

Oct 28, 2011

I'd like to compare two columns of data and highlight where a value doesn't occurr in both columns. The problem I have is that one of the columns uses * around the text to ensure it catches all variations of the value.

I have the following formula which would work if the data was exactly the same.

=COUNTIF(lst2,value)=0

However, these *'s are meaning it never works.

Is there a way to make it so that if the values with the *'s are not found in the 1st column of data, conditional formatting is activated?

View 4 Replies View Related

Find And Replace Numeric Amounts With Asterisk

Oct 23, 2012

I have an ad hoc txt file that I import into Excel and use text to columns. The problem is some of the amounts have an asterisk in it such as: 10,412 *

I tried to use the find and replace, but the "*" is considered a wildcard and instead of changing the field to just 10,412, it deletes the entire amount.

Is there a macro that I can use to get around this? The amounts are listed in column G & H

View 4 Replies View Related

Can Wildcard Search Asterisk Be Tuned Off When Using VBA Code?

Dec 26, 2012

I am trying to run a routine in VBA that will Search for a Part-No. that normally contains asterisks. It is giving me bad positive Search results due to the coding looking at the (*) asterisk's as a wildcard character.

The following Part-No.'s are located in cells (C11:C16):
9L3Z*17757*BCP
6C3Z*16138*AACP
AE5Z*16138*B
AE5Z*17E811*CF
AE5Z*17E811*F
AE5Z*17E810*F

Part-No. to be Searched for:
AE5Z*17E811*F

When the below code is run, the incorrect Part-No. 'AE5Z*17E811*CF' is found in cell (C14) rather than the correct Part-No. found in Cell (C15).

Code:
'The following 2 lines are defaulted for ease of coding
pNumb = "AE5Z*17E811*F"
Range("C11", "C16").Select

[Code] ......

View 5 Replies View Related

If Cell Doesn't Start With Asterisk Delete Row

Jun 20, 2007

Sub DeleteRowsBasedOnCriteria()
'Assumes the list has a heading.
Dim cl As Range
For Each cl In Range("A6", Range("A65536").End(xlUp))
If cl.Value <> "=~*" Then
cl.EntireRow.Delete
End If
Next cl
End Sub

but it is deleting every row, I am not sure what is wrong?
starting in cell A6
if cell does not start with *, then
delete entire row,
next cell

that is the logic im seeing...ive tried a few o ther combinations like "~*" etc...

View 9 Replies View Related

Remove Just Text From Cells That Contain Mixed Text

Jul 12, 2002

I have a column in which the cells contain values such as "012321 BGH YRK". Is there any way you know of that I can remove just the text from every cell and keep the numeric values? A mass operation because there are literally hundreds of these cells. I am using Excel 2001.

View 9 Replies View Related

Can Use Asterisk Wildcard To Save File In Multiple PATH?

May 30, 2014

Can I use the asterisk (*) wildcard to save the file in multiple PATH as long as it the file is in the master drive C:

Ex: the file now is in "C:Public" then can I use "C:Public*" so user can save file at their desire sub-folder such as "C:PublicHenry" as long as it has to be in drive C

View 6 Replies View Related

Delete Entire Row If Cell In Column Starts With Asterisk

May 9, 2008

I'm using the following code to delete rows that I don't want to include and I've ran into some more things that need to be deleted...

For lLoop = RngCol.Rows.Count To 2 Step -1
Select Case RngCol(lLoop, 1)
Case " Date:", "Skill:", "Agent Name", "~*", "*Train*"
RngCol(lLoop, 1).EntireRow.Delete
End Select
Next lLoop

An example of "~*" would be: ***SICARII***
An example of "*Train*" would be: Ozgrid Train1

It's not recognizing these new cases. Do I have to utilize FIND? (since CTRL+F does work with the given cases)

View 4 Replies View Related

VLookup To Find The Customer And The Dates And Then Bring Me Back An Asterisk In A Separate Column

Jul 27, 2007

I have 2 spreadsheets. One is a promotion calendar that lists the dates that promotions on a certain product runs. The other is a shipment grid of shipments of that product to the customer.

I want VLookup to find the customer and the dates and then bring me back an asterisk in a separate column to show me that that certain week that product was delivered was a promotion week. The problem I have is using Vlookup to lookup 2 things at once (and if they match to the promotion calendar) and return me an asterisk.

Here is my formula now:

=IF(VLOOKUP(J2&" "&L2,'East Data'!M:AU,2,FALSE),"*",0)

J2 is the customer name
L2 is the week
"East Data" is the spreadsheet with all of the promotions and customers.

View 9 Replies View Related

Remove Text Header

Jun 24, 2009

I have two txt file where the report is being generated but importing it in excel and using text to column distorts the data plus it has a header which repeats on every page... how can delete those header and tidy the sheet up. I have attached the txt header example.. Any help on this.

View 14 Replies View Related

Add Or Remove Text Within One Cell?

Aug 13, 2009

I need to format C2 so that it removes all text that comes after a dash in B2, but if no dash exists, then it returns the text: Parent. For example, here are 3 values in B2, B3, and B4:

1234-s
1234-m
1234

In C2, C3, and C4 I'd like to have the following values returned based on the above values in B:

1234-
1234-
Parent................

View 2 Replies View Related







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