Set A Paramater Any That Begin Contain
Jan 20, 2009
we query SAGE, and have account codes begining xx-xxx. We use the project ledger which attaches a letter on the end depending on the works, i.e. 00-001A, 00-001B, etc
I need to set a paramater to say any that any that begin/contain (i.e. LIKE %) 00-001 filter out, regardless of the letter.
I know the basics of [paramater] or ?, but the ? doubles as a wildcard in the like criteria. Whenever I try to put a paramter value in it shows nothing. I can get it to work for exact, >< etc but not contains or begins. Even if I play with the SQL, nothing!
View 9 Replies
ADVERTISEMENT
Apr 21, 2009
I'm trying to write a remove duplicates sub that can be passed the worksheet name and columns on which to check. It's pasted below. Above the key line is a commented out line of code that worked. So it works to pass theh worksheet, but I'm hung up on how to pass varying columns to it.
Sub RemoveDuplicatesSub(wksht, cols)
'Remove duplicates.
'Assumes that the data range is in a table
'Assumes the header row starts at row 7
Dim WS As Worksheet
Dim TableName As String
Set WS = Worksheets(wksht)
TableName = WS.ListObjects(1).Name
'WS.Range(TableName).RemoveDuplicates columns:=Array(3, 4, 5, 6, 7, 8, 9, 10), Header:=xlYes
WS.Range(TableName).RemoveDuplicates columns:=Array(cols), Header:=xlYes
End Sub
View 9 Replies
View Related
Dec 30, 2009
I have a spreadsheet that contains private information, but I'm hoping this is a simple request. If the cell in column A does not contain text that begins (starts) with the letter "L", the row needs to be deleted. The rows that will be deleted usually start with "A2008..." "A2009..." "E2009..." etc. The row I need to keep always starts with "L", then a space, then more text.
I'm looking for VBA code that I can implement into a macro program I have already done so that once I open up a file, I can click a button and not have to do this part manually anymore.
[Code]....
View 3 Replies
View Related
Aug 18, 2012
I am preparing one macro and to make below macro more easier.
My Data is not constant. Everyday it get change.
In my data i am trying to delete all rows which begin with "MEANING".
I have prepared below macro but problem here is in range i am taking maximum rows i.e 65000 as i am not sure how many rows will be there in my data which begin with Meaning.
I just wanted to know what is the coding we use to go down untill data end if we are not sure about the range.
Selection.AutoFilter Field:=1, Criteria1:="=MEANING*", Operator:=xlAnd
Range("A3:A65000").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.EntireRow.Delete
View 4 Replies
View Related
Nov 21, 2012
I am trying to create a formula that sums all the cells that have numbers that begin with 12. For example, here are the numbers in cells A1 through A6 (my actual spreadsheet is much larger):
12
1200
13
1
120
112
I want to pull the 12, 1200, and 120 for a total of 1332.
View 2 Replies
View Related
Jan 28, 2010
See attached file...I'm having trouble returning a value for the Alpha-numberics that begin with DMR, which should return 'Dishwasher'. All other values are correct, I'm sure it has to do with the character range but I'm a little stumped.
View 4 Replies
View Related
Jul 25, 2006
in excel how do I count cells that begin with specific text. Ex: in a
column with 100 entries, I want to count the number of cells that have the
letters "app" from the word approved as the first three characters in the cell
View 9 Replies
View Related
Sep 3, 2008
I am trying to write a piece of vba that clears the contents if the first character in the cell is not #.... if I use "#"*, I get a syntax error
Just figured my syntax needs a slight adjustment to be recognized...
View 9 Replies
View Related
Mar 31, 2009
I have a column that has values ranging anywhere from 1 to 999,999 and I need a way in vba to take whatever value is in the specified cell and place a decimal point at the far left. Example:
change 175526.34 to .17552634
change 376.1 to .3761
change 22987.254 to .22978254
when the code is run I need the selected number to begin with the decimal point.
See, the tricky part is that the length of the number varies and I cant just divide by X to shift so many places to the left..
View 9 Replies
View Related
Nov 5, 2008
I want to use the SumIf function to sum cells when other cells begin with certain characters.
I've toyed with a few ideas of how this could work, but i don't know how to specify that the cells need to begin with certain characters. The cells that would be the criteria and the ones that would be summed come out of an Oracle database (and i have no control over the way they're pulled out - yet) so the beginning characters are connected to extremely unique information, so i dont want that to be included in the if part, for obvious reasons.
View 9 Replies
View Related
Dec 30, 2009
I have a spreadsheet that contains private information, but I'm hoping this is a simple request. If the cell in column A does not contain text that begins (starts) with the letter "L", the row needs to be deleted. The rows that will be deleted usually start with "A2008..." "A2009..." "E2009..." etc. The row I need to keep always starts with "L", then a space, then more text.
I'm looking for VBA code that I can implement into a macro program I have already done so that once I open up a file, I can click a button and not have to do this part manually anymore.
View 2 Replies
View Related
Jul 10, 2007
Is there a way to count all sheets between sheet "Begin" and sheet "End" if the sheet contains the word "complete"? The word "complete" can be found anywhere in the spreadsheet. If I need to be more specific let me know.
View 9 Replies
View Related