Linking Partial Cell Data
Jan 5, 2009
I have two cells on Sheet 1 - Cell A1 and Cell A2.
Cell A1 is the first cell that will receive either a number, or nothing. When it receives a number, the number will always contain five digits. (For example: '23456'.)
The contents of Cell A2 depend on the contents of Cell A1 - If Cell A1 contains a five digit number, then Cell A2 will display that same five-digit number with '-1' following it. (In our case: '23456-1'.) If Cell A1 contains no number, then Cell A2 will just be another ordinary cell allowing the user to enter whatever he/she desires.
The extension in Cell A2 should remain editable at all times - if the user wishes to change the '-1' to a '-2', for example, he/she should be able to do so without any error messages appearing. However, the user must not be able to change any of the first five digits in Cell A2 as long as Cell A1 contains data. A message should appear stating that changes to the first five digits should be performed in Cell A1 - which would then change Cell A2 accordingly.
Also, if the contents of Cell A1 are erased for any reason, Cell A2 should keep the five digit number, but lose whatever '-x' extension it contained.
Can this be done using Data Validation?
View 14 Replies
ADVERTISEMENT
Jan 6, 2009
The merged Cell B6:G6 will receive a ten-digit number followed by a dash and then one or more numbers. (For example: 1234567890-123)
Cell B15 will then receive data shortly afterwards. I already have a validation macro for this cell which allows either 'I' or 'I I I'.
Upon exiting Cell B15, merged Cell B16:H16 needs a macro which will check Cell B15 and if it contains 'I', Cell B16:H16 will display the data from the ten-digit number entered in Cell B6:G6 minus the first five digits. (For example: 67890-123)
Now the data in Cell B16:H16 can only be somewhat editable hereafter. It can be erased or replaced with numbers in smaller or greater digit combinations than five before the dash (i.e. 67890-123 can be replaced with 123456-7), and digits can be added after the whole group (i.e. 67890-123 & SEE DWG) without any error messages. But if any five-digit number with a dash and some numbers exist in Cell B16:H16, they must correspond with the number in Cell B6:G6 minus the first five digits.
However, if Cell B15 ever receives a 'I I I' afterwards, all data in Cell B16:H16 must be erased. Cell B16:H16 can never contain data if Cell B15 contains 'I I I'.
Also, if the data in Cell B6:G6 changes later on, the corresponding digits in Cell B16:H16 must change as well, even if there are digits after the whole group.
So here is an example of what a good macro would do for me: ...
View 14 Replies
View Related
Nov 12, 2009
I have had much assistance with this complex (I think it's complex) macro in the past, however, there are still a few bugs that need to be worked out in order for it to be completely efficient. Any help would be really appreciated, and I'll do my best to explain what's going on at this point:
I have a worksheet called the 'Data Entry Page'. You will find it attached. Here are the requirements:
The PO Number cell will only allow ten digits with a dash, and will receive values such as 1200012345-1.
The Part Number cell will receive a value which will usually be six digits long with a dash, and will receive a value such as 654321-1.
The Identification Type cell will receive at least one of the following values, or two or more of the following values separated by '&' (Note the spaces between the digits):
I
I I
I I I
IV
IA
I IA
I I IA
IVA
or (some combination examples):
IA & I I I
I I & I I IA
I VA & I IA
View 13 Replies
View Related
Apr 16, 2013
I am using Excel 2010. I am a novice user.
I have a lot of data to filter / sort. I want to initially to create a filter for a column of data - which has the format similar to hierarchical paths to files. The data is a mix of text/numbers. e.g.
pathA/path_X/path_Y/path_Z/lso0_rxs_reg_254__5_0/d
pathA/path_X/path_Y/path_Z/lso0_rxs_reg_253__5_0/d
pathA/path_123/path_456/data_out_reg_17_0/d
pathA/path_123/path_456/data_out_reg_0_0/d
pathA/path_X/path_Y/path_Z/lso0_rxs_reg_255__5_0/d
[Code] .........
Doing an alphabetical sort of this date would return the following order. As you can see while each strings in unique - there are many instances where they are simialr - if you ignore the unique numeric values at the end of the string.
pathA/path_123/path_456/data_out_reg_0_0/d
pathA/path_123/path_456/data_out_reg_17_0/d
pathA/path_123/path_456/data_out_reg_4_0/d
pathA/path_X/path_Y/path_Z/lso0_rxs_reg_230__6_0/d
[Code] ......
So what I want to do is to create a filter for the strings - but ignoring the numeric bits at the end i.e.
reg_[0-9]+_+[0-9]+/d
The strings are obviiously of varying length and the number of hierarchical paths is different, so I can't split string on "/".
Similarly folder paths names can contain "_" so can't split string on this either.
As I don't know how many "/" or "-" instances there will be in the string I don't believe I can use the find function. Also as the amount of number will be different i don't think I can use =right(a1,X) either.
I may be able to search for the pattern above - as this is probabay unique - so maybe it's something like the following pseudo code:
Function GetString(txt As String) As String
With CreateObject("VBScript.RegExp")
.Pattern = "reg_d+(_)+d+//d"
GetString = .execute(txt)(0)
End With
End Function
If I do require VBA code - how do I then use this for creating a column filter? Or will I have to extract the filtered data first from the column (and its associated row data) into another worksheet to use?
Once I have the filter in place I want to create tables using the filtered data - so for example each column value above has a lot of associated data values in each row e.g
26 pathA/path_123/path_456/data_out_reg_0_0/d
32 pathA/path_123/path_456/data_out_reg_17_0/d
8 pathA/path_123/path_456/data_out_reg_4_0/d
So my table would show the name "data_out_reg" and the range of values 8-32
View 1 Replies
View Related
Jul 31, 2014
Is there a way I could achieve copying cell's content minus some characters?
For example in the cell A1 would be: "two apples"
I would put into the B1 cell something like =A1(-4charactersincludingspace) - the result in B1 should be "apples"
Is it understandable what I mean?
View 1 Replies
View Related
Jan 23, 2013
I have a spreadsheet full of data and I need to extract only those lines of data which can be identified by the last three letters in a cell. I am adding an example spreadsheet which highlights the rows I am trying to extract based on the contents in column B but only where column B ends in KY.
Example data extract requirement.xlsx
View 5 Replies
View Related
Mar 12, 2012
I have data below, what I am trying to do is to put an "x" if the data has a partial match. This is what I am using below.
HTMLSheet1 ABC1G. Washington SchoolGEORGE WASHINGTON SCHOOL 2Electrical Magnet SchoolELECTRICAL 3Sports Magnet SchoolCOLUMBUS SCHOOL 4JonesJONES SCHOOLx5J. StrongSTRONG SCHOOL 6Abe Lincoln SchoolLINCOLN SCHOOL 7HarrisonHARRISON SCHOOLx8Abe Lincoln SchoolLINCOLN SCHOOL 9Abe Lincoln SchoolLINCOLN SCHOOL 10Abe Lincoln SchoolLINCOLN SCHOOL Spreadsheet
[Code] ...........
What I would like is this
HTMLSheet1 ABC1G. Washington SchoolGEORGE WASHINGTON SCHOOLx2Electrical Magnet SchoolELECTRICALx3Sports Magnet SchoolCOLUMBUS SCHOOL 4JonesJONES SCHOOLx5J. StrongSTRONG SCHOOLx6Abe Lincoln SchoolLINCOLN SCHOOLx7HarrisonHARRISON SCHOOLx8Abe Lincoln SchoolLINCOLN SCHOOLx9Abe Lincoln SchoolLINCOLN SCHOOLx10Abe Lincoln SchoolLINCOLN SCHOOLxSpreadsheet FormulasCellFormulaC3=IFERROR(IF(SEARCH(A3,B3),"x",""),"")C7=IFERROR(IF(SEARCH(A7,B7),"x",""),"")
View 6 Replies
View Related
May 20, 2014
This is for Excel 2007,I have two sets of model numbers. One set is the full model numbers of the units we use, and the other is an abbreviated form used to lookup up certificate numbers. I need a way to match these up so I can use one set of search criteria to find out if there is a match. Here is an example of what I need to match with a partial text match:
H,AE35(6,9)36+TD and AE3563636D145C2501AP
H,RE36(6,9)36 and RE36936C145B2505AP
if I could do this with a formula that matches multiple items at the same time (ie; if A & B & C match=true) with the above model number being one of those items (certificate numbers are issued for sets, but the other model numbers are fine).If that's not possible, a one time VBA run to match all of the abbreviations at once would also work. If these items are matched up with a one time VBA, the VBA needs to account for their being more than one match for each abbreviation depending on the size of the unit.
So H,AE35(6,9)36+TD could be matched to:
AE3563636D145C2501AP
AE3563636D175C2501AP
AE3563636D210C2501AP
View 11 Replies
View Related
Jul 18, 2006
I need to match up the columns of 1 spreadsheet with those of another. I have a partial address that only lists city and state in one workbook. I need to match these partial addresses up with the master list that contains full addresses. It seems like it should be an easy thing to do, but I can't figure it out.
View 9 Replies
View Related
May 12, 2014
[Code] .....
My data are ABC:apple and im looking in a column where data are like these : apple, melon, lettuce.
View 1 Replies
View Related
Jun 2, 2006
I have set up data validation on a cell that produces a
drop down list of part numbers.
Is there a way that I can enable a partial part number search?
If I type in 354, all part numbers that start with 354 will be in the drop down list for me to choose from.
View 9 Replies
View Related
Sep 4, 2006
My database includes data about period (column A), a product code (column B), Turnover previous year (column C), Trend (column D) and Turnover this year (column E). In column C i want to have the turnovers from a particular product code from the previous year. The difficulty is:
1. that the product code can vary
2. not all periods are availabe.
How can i formulate a formulate that shows the turnover from the previous year, and in case there is no data from the previous year it should show "n.a.". This formula must also take into account that product code can vary. In my example: C3 should show 1296, C4 should show 877, C5 should show 884 and C6 should show 960. In case the turnover of period 200104 was not available C3 should show n.a.
View 3 Replies
View Related
Nov 22, 2006
I have a cell that contains a string which is always formatted the same. "Dated between Date1 and Date2" I would like to put Date2 into a variable; however, I don't know how to get just that part of the cell.
View 9 Replies
View Related
Dec 18, 2013
I am trying to search partial txt with in data range.
View 4 Replies
View Related
Feb 19, 2008
I have data in columns a - d; the number of records can vary from a few to a huge number which (to me) makes the problem more complex.
I need a macro that will copy every 3rd record into rows e - h; and every 5th record into columns i - l, etc.;
View 9 Replies
View Related
Sep 16, 2006
is it possible to reference part of a data series from a chart to a combo box?
View 3 Replies
View Related
Apr 18, 2008
I have two worksheets. Both worksheets have two columns. Worksheet 1 column A looks like this:
1
4
7
8
Worksheet 1 column B looks like this:
x
x
x
x...................
What I'm looking for is a way to find that in worksheet 2 in column B a 'x' appears behind 1,4,7 and 8.
View 3 Replies
View Related
Mar 31, 2014
I am making a table in excel where I list video games and I would like to place a hyperlink in line with them to open a search page on eBay, I've made a URL-friendly cell (replacing the spaces with + signs, like they do on the URL.
Example table:
game title
game+title
Check
On the "Check" cell I would like a hyperlink that contains the value of the cell saying "game+title" (supposing that is cell B2), i.e:
[URL]....
How would I go about it?
View 2 Replies
View Related
Dec 27, 2012
I have a simple reporting sheet where the data for orders place is in one sheet and on the other sheet is an imput box for 'date' and it filters through and presents a table of data and two graphs for the date chosen.
I give a daily report (contents of this sheet) but I also need to leave this sheet available for anyone to open and change to another date.
I want to copy the repor sheet into a new one and email but I want the graphs to remain, not go blank when anyone changes the original sheet.
Excel 2007 / Windows 7.
View 3 Replies
View Related
Jun 30, 2006
I have two questions:
a. Check the code below:
Dim news1 As String, news2 As String
news1 = "new"
news2 = "polygon"
Dim countie As Integer
For buddie = 2 To b1.UsedRange.Rows.Count
'If b1. Cells(buddie, 1).Value Like "new*polygon" Then
If b1.Cells(buddie, 1).Value Like news1*news2 Then
countie = countie + 1
n1.Cells(buddie, 10).Value = "test"
End If
Next buddie
I have 2 strings, news1 and news2, i need to use the like function to check the occurance of these two strings in all the cells, and just for testing purpose, im printing 'test' it out in another excel sheet.
How do i make that work? the commented line shows what exactly i want, only that i dont want to hard code the string values.
b. If i have a value in the cell:
/new/blahblah/anycra/polygon
how do i split it so as to assign two variables to have 'new' and 'polygon'.
View 9 Replies
View Related
Mar 22, 2007
I have a simple lists containing two columns. One column contains a five digit number and the other a vendor name. The vendor name in most cases is two to four words. I am wanting to type in a partial string of the vendor name and it return to me the 5 digit 'vendor' number.
Col A Col B
20567 3M Electrical, Inc.
I want to type in '3m' or '3M' or 'electrical' or 'ELECTRI' and it return the 20567. The other part of this is that there may be two rows with the same info in which I would need to see both...
Col A Col B
20567 3M Electrical, Inc.
21789 3M Tape Division
Is this possible with standard lookup features in Excel or does someone have a VbScript or macro that will accomplish this?
View 9 Replies
View Related
Apr 25, 2012
I am copying text (contest results from another website) and posting into excel. As it is formatted on the original site, it posts the place, followed by a period, then the team name, then a dash, then the score.
Example ... 4. Smokers Purgatory - 662.2858
To place it in our database we need the period removed from the place, and the dash and score removed.
Example ... 4 Smokers Purgatory
Is this possible to automate in excel or is there a way to format so that excel seperates the place, team name and score? Or should I be looking for a different method?
View 6 Replies
View Related
Jun 8, 2012
I have the following code to find text on a sheet. It works perfectly except that I want it to find partial text in a cell as well.
Thus, if the text in a cell is Goodwood, it will find it if I type in Goodwood as my search. I also want to find Goodwood if I only type in Good.
The Lookat:=xlPart does not seems to work.....
Dim rFound As Range
Dim iCount As Long
Dim Text As Range
Dim MyRange As Range
Sheets("All Codes").Visible = True
[Code]...
View 2 Replies
View Related
Aug 27, 2012
I need to find the last row of a table I'm manipulating with VBA. The last row contains only the subtotal of a specific column. I am currently using the following code to find the last row. (NB:'j' is the the specific column, the formula in the last cell is shown in the Do While conditional, but the value 109 can change)
Code:
Do While Cells(i, j).Formula "=SUBTOTAL(109,[BID PRICE '#1])"
i = i + 1
Loop
However, this code will not work if the user adds a row to the table. I've tried using a partial string search, but the do while conditional is always true. I assume this is because the cell contents are a formula and not a string.
Can I change my conditional to search for just the "=SUBTOTAL" portion of the formula?
View 1 Replies
View Related
Jan 30, 2013
I haven't had the need to work with partial strings till now and having difficulty finding the right context in other threads. I need to put the first 4 characters of one cell into another cell. The line in the below code with the comment is the one I need. It's the only one where I need only part of what is in the cell.
It should be = the first four characters of cells(zRow, "A")
Code:
Dim LastRow As Long
Dim zRow As Long
Dim cRow as Long
LastRow = Sheets("Datasheet").Range("N65536").End(xlUp).Row
zRow = 1
cRow = 2
[Code] ......
View 1 Replies
View Related
Dec 12, 2007
I need to extract partial contents of a cell.. right now in the cell it looks like
address: 9999
so I want my code to see the cell... dropp the "address: " and only retrieve 9999.
I know it's on google somewhere but I can't seem to describe it properly for the right results to come up.
View 9 Replies
View Related
Jul 29, 2006
I got some data like this
A1=CTAC US
A2=FCOB US
A3=TW US
The gap between each word and the word "US" is uneven. sometimes it's 3 spacebar apart, and sometimes 4.
I am trying the pick the part not including US. I tried =IF(ISERROR(SEARCH("US",A1)),A1,LEFT(A1,SEARCH("US",A1)-1)). It works but when I use match function to look up the word. It returns N.A. As the output is not just CTAC(4 characters), but 5 characters(including blank). The problem is the gap between between the word and "US" is different for each cell. so I cannot just minus the same character in the above formula (e.g. -2 if there is one blank cell). Anyone can tell me how to pick out the word and with only the number of characters in the word?(no blank)
View 5 Replies
View Related
Aug 10, 2006
I have a problem, in a table, the cell H5 has this formula. .=IF(E5=20, COUNTIF(G5,">=10y")+COUNTIF(G5,">=12y") +COUNTIF(G5,">=14y")+COUNTIF(G5,">=16y")+COUNTIF(G 5,">=18y")). every time that G5 has a value >= "10y"or "12y" until "18y", H5 should add 1 or 2 until 5. when I fill out C5, with an answer value in G5 of + 18y, H5 = 5, everything works fine. writing 02/08/1988 in C5 the result in H5 is 5, but when I change the value of C5 for 02/08/1999, H5 should be "0" but it continues with the value 5.
View 7 Replies
View Related
Jan 2, 2014
Below is a small sample of Column A from a spreadsheet I'm working with. All cells in the column begin with a 6 digit number:
115383_BOSTON
115384_NEW_YORK
115385_PORTLAND
115402_LOS_ANGELES
115403_WACO
115010_SAINT_PAUL
115011_SAN_DIEGO
115130_WEST_NYACK
115021_CHAPEL_HILL
What formula would allow me to enter only a 6 digit number and return the entire cell contents, i.e, search for 115403 and get a return of 115403_WACO ? I have tried INDEX and MATCH, but I'm not getting the results I need.
View 7 Replies
View Related
Sep 19, 2006
I have an excel sheet that we need to type in an account number it always starts with 8774100 then has 9 more numbers. If I leave it on number formating it always changes the last number to 0 so I format the cell as TEXT. Anyway is there a way to get the 8774100 to automatically go in and only have to type the last 9 numbers? I know I can copy paste but then I have to double click or make sure I enter the last 9 numbers at the end or use the top entry. The data entry people just want to hit enter and go from line to line fast. In the past I just divided the cell into 2 cells and made the 8774100 in column A and columb B was the ending 9 numbers. But they need to be in the same cell.
View 2 Replies
View Related