Concatenate Comments For Rows Above Each Record ID
Sep 29, 2009
Unfortunately my strengths do not lie in VBA for Excel. But I have a problem which needs resolving using a macro because this spreadsheet scenario happens often.
I have three columns (Record ID, Comment, Results). The Results column is added to capture concatenation of the Comments column. Using VBA, I want to concatenate Comments for each Record ID in the Results column on the row for that Record Id where the rows above have no Record Id.
Each comment should stack in order with a carriage return between them. This should happen for each row where a Record ID exists and continue for the length of the spreadsheet until it finds the last row with a Record ID and should stop after concatenating its results.
View 8 Replies
ADVERTISEMENT
Aug 14, 2009
With the help of Venkat1926 I established a macro that successfully hides a number of rows that are unrquired (based on dates):
View 14 Replies
View Related
Feb 15, 2007
Is any way to add automatically comments in VBA
Some combination of "ctrl" with something else.
View 3 Replies
View Related
Jun 10, 2013
I'm trying to create a .cvs file from an exported excel report, but before I can import it to a database I'd like to have one row per record.
I've already omitted out the headers and footers blank spaces and unnecessary columns from the excel file and I needed to just combine multiple rows into one.
It currently looks like this:
ROW#(1), ID#(1), NAME(1)
ADDRESS(1), ZIP(1)
DOB(1), SOURCE(1)
ITEM(1), CITY(1)
ROW#(2), ID#(2), NAME(2)
ADDRESS(2), ZIP(2)
DOB(2), SOURCE(2)
ITEM(2), CITY(2)
and so on..
I'd like to make it like
ROW#(1), ID#(1), NAME(1), ADDRESS(1), ZIP(1), DOB(1), SOURCE(1), ITEM(1), CITY(1)
ROW#(2), ID#(2), NAME(2), ADDRESS(2), ZIP(2), DOB(2), SOURCE(2), ITEM(2), CITY(2)
and so on...
I can't figure out a macro or a way to do this automatically.
View 8 Replies
View Related
Nov 2, 2009
I have been provided a spreadsheet which has a Quantity column "H". In this column is the quantity of the items and a note containing the serial numbers of the items. The note has no real format. Here are some examples:
Example 1: Serial numbers: 161702, 161722, 161740, 161741.
Example 2: Dec 2006: s/n 63194
Jan 2007: shipped 1 widget, 52480
Example 3: Sent in 2004: 717, 718
Apr 07: shipped 63522 and 63524.
Oct 30, 2007: K. Grande reported only two widgets onboard, 63522 and 63524. 717 and 718 are missing.
Nov 2007: 160302.
Dec 14, 2007: shipped 161093.
There are thousands of serial numbers on hundreds of rows like this. I am looking for code that would copy a new row to another sheet for each serial number in the comment with the serial number placed in column "J". I don't know if the extraneous text can be filtered out, but if I can at least get everything on a seperate row, I can sort/delete what I don't need a lot faster than doing this manually.
In have uploaded an example with before and after sheets. The After sheet is what I have done manually so does not match the examples I used on the Before sheet.
View 6 Replies
View Related
Jan 3, 2010
I have a spreadsheet where i have security set to prevent a user from selecting locked cells. However when a user selects a cell that is in a row at the bottom of the vissible area the comment text can not bee seen. What i need is to determine what the bottom vissible row is and use that to compare the row number of the current row and thus decide if i should scroll down to improve the visibility of the help text for the cell in question.
View 3 Replies
View Related
Jan 21, 2010
I import a sheet and some records have 2 rows some 3. is there a way to add the extra row as needed based on column A?
View 9 Replies
View Related
Aug 24, 2006
I have some data in a excel worksheet.
The main data are in eg row 1 to row 50; row 1 will always contain data and the last row is not fixed.
After the last record, there is always 1 empty row, followed by some data in subsequent rows.
I wish to delete the rest of the rows after the last data. eg from row 51 to row 200.
Sub Macro1()
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1).Select
End Sub
View 7 Replies
View Related
Jan 10, 2013
I have a text file that contains two rows of data for a single record. when I open the file up in excel, it puts each row into column A. What I need to do is put the 2nd row and combine it with the data in the first row so that i can then run the text to columns wizard and put all the data into its own column.
Here is an example of the data:
TEWAC Dresser Rand SAB 21120-14 1350 1687 3300 80 .80 50 4 2.63 EE-7592 1 2250 46 30.5 14 6
10 12 1 4 .229 .102 2 2 .0303175V/1 HL2 .13 .50 .25 1.5 394 3.000
IP23 Andalas SAB 21000-28.5 1500 1875 415 80 .80 50 4 4.22 EE-7777 80/50 Rise 1 2250 43 30.5 28.5 10
2 13 4 8 .258 .102 0 0 3175V 2 .11 .46 .25 1.5 1.500
CACA Intergen CACA 21120-33 1720 2150 6600 70 .80 50 4 4.56 R971055 50C Amb EE-7467 1 46 30.5 33 14
8 14 1 2 .229 .144 2 2 .0303175V/1 HL2 .20 .65 .30 2.0 697 2.150
What it should look like is the following:
TEWAC Dresser Rand SAB 21120-14 1350 1687 3300 80 .80 50 4 2.63 EE-7592 1 2250 46 30.5 14 6 10 12 1 4 .229 .102 2 2 .0303175V/1 HL2 .13 .50 .25 1.5 394 3.000
IP23 Andalas SAB 21000-28.5 1500 1875 415 80 .80 50 4 4.22 EE-7777 80/50 Rise 1 2250 43 30.5 28.5 10 2 13 4 8 .258 .102 0 0 3175V 2 .11 .46 .25 1.5 1.500
CACA Intergen CACA 21120-33 1720 2150 6600 70 .80 50 4 4.56 R971055 50C Amb EE-7467 1 46 30.5 33 14 8 14 1 2 .229 .144 2 2 .0303175V/1 HL2 .20 .65 .30 2.0 697 2.150
leaving me with 3 rows and one column of data.
I have multiple files with about 600 rows in each that I need to process.
View 2 Replies
View Related
May 25, 2007
I seek advice on using the value of NOW() as a record ID in an address book program. Question #1: Do Excel developers often use a record ID? Question #2: What record ID schemes are fequently employed besides date/time? I have decided to create an Excel address book as an exercise to increase my knowledge of VBA, and also as a useful application for work.
I realize that a record ID is not essential in Excel in the way that it is essential in Access, but I feel the need to have some unique ID associated with each address, so that I may have different worksheets, with data related to a given Contact, sort and manipulate it, if necessary, but have the record ID as a way to restore the relationship of rows to a given Contact, and also, as a handy way to examine the data in the date/time sequence in which it was entered. I have experimented with the following code, to assure myself that I can access the number returned by the NOW() function, manipulate it as a string, and format in various ways if necessary.
Dim n As Double
n = Now()
sn = Str(n)
p = InStr(sn, ".")
first = Left(sn, (p - 1))
l = Len(sn)
d = l - p
S = Mid(sn, (p + 1), d)....................
View 2 Replies
View Related
Sep 22, 2008
I would like to combine values from multiple records into a single record using a unique identifier. In the example below 'ID' is the unique identifier.
For example:
View 3 Replies
View Related
Aug 9, 2009
I have multiple rows that I wanted to concatenate. I want the values delimited to a symbol like +. The problem using the sample formula =CONCATENATE(A3," = ",B3,"+",C3,"+",D3) is if there's a blank row the + sign will still display. I attached sample file with the desired result.
View 5 Replies
View Related
Jun 26, 2009
I have attached an table and need to combine name from different rows which a condition that the ID is the same and the name are different from others. However, the code that i have will combine all the name if the ID is match. I'm not familiar with the Macro.
View 4 Replies
View Related
Apr 27, 2006
Can I concatenate two different rows in a column?
View 10 Replies
View Related
Mar 16, 2014
I am creating an asset management sheet. For the formula I am trying to work out there uses 3 fields : ID, start date, and end date.
What I want to do is be able to show if the ID is duplicated within another record with an overlapping date. So an item is flagged if it is in the list within the same dates as another record. I tried a few countif formulas but with no success.. I may just be approaching the problem incorrectly though.
View 1 Replies
View Related
Aug 3, 2008
I was trying to create this certain tool using excel which queries data from database. I was successful in obtaining the data I need and paste it to my spreadsheet, however, there are some requirements I cannot create a solution with. Below is a description of my Excel file (which is also attached):
- There are 9 columns on my spreadsheet
- Number of records per data refresh are indefinite, for information in database are constantly being updated
- Several cells on the first column have exactly the same information
The requirements I cannot do are:
- For all cells on first column that have similar values, their corresponding data on column 5 should be concatenated
- Delete rows that have same data for column 1 except the first record found, place concatenated data on column 5 of first record
Example:..................
View 4 Replies
View Related
Jun 5, 2009
I have a spreadsheet with three columns (check #, invoice #, vendor #). If a check pays multiple invoices, there is a separate row for each instance of invoice #. (ie if a check pays 10 invoices, there are 10 rows all with the same value for check # and vendor #, but different invoice #s). I need to concatenate the multiple rows to just one row per check #, with all the invoice #s in separate columns on the same row and delete the duplicate check # rows.
However, I can only use 10 columns, so if there are more than 8 invoices matching the same check #, the 10th column will need to contain invoices 9-n concatenated and separated by a space. I have over 5000 rows in the spreadsheet.
View 2 Replies
View Related
May 26, 2009
I am looking to create a macro that will create a new sheet when data is added on a summary sheet. Example.
1. Summary sheet called "Variations" contains columns that will contain the information needed for new sheet (Columns A to D)
2. When data is entered on "Variations" sheet: Column B, then macro automatically creates new sheet renamed to e.g. VO1 (Number used on "Variations" tab) and is a copy of "Master" tab.
3. Data entered in Column A to D on "Variations" tab is automatically entered onto new sheet created (e.g VO1). Shown is blue on attached file. Additional data is updated on "VO1" sheet and this then links back to "Variations" tab
View 6 Replies
View Related
Mar 20, 2009
I'm trying to find a macro that will run allowing the user to select a 'starting record number' and a 'finishing record number' when printing.
I have a spreadsheet that feeds from a master list in excel, from over 5000 records.
I need to print the s'sheet with any given indivdual record's information at any given time.
Individual prints are fine. However if I wanted to print from record number 1500 to record number 3000 it would take me all day.
Is there a way I can set up a macro so an option form pops up? allowing selection of "From record" and "to Record" ?
View 13 Replies
View Related
Aug 16, 2013
I am attempting to concatenate the dept numbers for each user in a list. For example, the first user listed below is associated with 6 depts. I would like the resulting macro to concatenate the dept's into one cell next to the Name.
Below is an example with the solution I am attempting to produce.
Sample Table
Name
Dept
Abbruzzese,James L
188100
[Code] ......
Output
Name
Dept
Abbruzzese,James L
188100, 231100, 600377, 600656, 600663, 600708
Abdi,Salahadin
600607, 600670, 600878, 600879, 710432, 710432, 710435
View 2 Replies
View Related
Oct 6, 2007
I have a list of P/N's that are used in more then one location. and it's sorted by P/N's.
ColA__ColB__ColC
______Loc___PN
______1_____A
______2_____A
______3_____B
______4_____C
______5_____C
I Want to be able to put in Col A the concatenate results of all equal P/N's from any given list. Or at least select the few cells that i know are duplicates and from that copy the Location to a single Column.
ColA ColB__ColC
______Loc__PN
1,2____1___A
_______2___A
_______3___B
4,5____4___C
_______5___C
View 5 Replies
View Related
Aug 11, 2013
Sampling table :
one
two
three
four
one
two
three
one
two
one
Desired results obtained via IF =IF(B2>0,A2&" , ",A2)&IF(C2>0,B2&" , ",B2)&IF(D2>0,C2&" , ",C2)&IF(D2>0,D2,"")
one , two , three , four
one , two , three
one , two
one
Is there any smarter, shorter formula via Concatenate and Substitute or other formulas ?
My closest match, but not good enaugh is =SUBSTITUTE(CONCATENATE(A2&", "&B2&", "&C2&", "&D2), ", , ", " ")
[ returna 2 commad ]
one, two, three, four
one, two, three,
one, two
one ,
View 9 Replies
View Related
Feb 4, 2014
How would you prevent the copy/paste of cells that have comments?
Also, how would you allow cells with comments to be copied and pasted without pasting the comments?
I also have an aside question about the forum advanced search. When searching for multiple search words, how would you type the search to include all words, for example, "prevent" & "paste" & "comments".
View 7 Replies
View Related
Jan 6, 2007
Im trying to record a macro that will enter a formula in a cell each time I run the macro
Drop the Lowest2:
=IF(ISERROR(AVERAGE((SUM(C5:L5)-MIN(C5:L5)-SMALL(C5:L5,2))/(COUNT(C5:L5)-2))*Scale!$B$2*10),(IF(ISERROR(AVERAGE(C5:L5)*Scale!$B$2*10),"",AVERAGE(C5:L5)*Scale!$B$2*10)),AVERA GE((SUM(C5:L5)-MIN(C5:L5)-SMALL(C5:L5,2))/(COUNT(C5:L5)-2))*Scale!$B$2*10)
Drop Lowest1:
=IF(ISERROR(AVERAGE((SUM(C5:L5)-SMALL(C5:L5,1))/(COUNT(C5:L5)-1))*Scale!$B$2*10),(IF(ISERROR(AVERAGE(C5:L5)*Scale!$B$2*10),"",AVERAGE(C5:L5)*Scale!$B$2*10)),AVERA GE((SUM(C5:L5)-SMALL(C5:L5,1))/(COUNT(C5:L5)-1))*Scale!$B$2*10)
I know I can write the formula in a simpler way, but I was asked to make it like this.
The problem is that when I enter the formula in the cell while recording. I got a message: "Unable to record" so this part can't be recorded
View 14 Replies
View Related
Sep 1, 2009
This problem seemed to revolve around "digital signing" with further macro changes done from a different machine (without the proper certificate). Excel warns of the problem and then "unsigns" the project.
I've got a problem with spreadsheets that I've been working on. Now, when I tell it to record a macro, I get the macro name, shortcut assignment dialog box and then an error "Unable to record." After "Ok"ing that dialog box, the normal recording macro dialog comes up. Also, lo and behold, there will not be a macro recorded.
I've got no protected cells or sheets and it doesn't matter what security level is set. It is a "signed" macro but I can take off the signature and still have the problem. I checked for "Help - About" for deactivated modules and there was none.
View 2 Replies
View Related
Jul 11, 2005
I know that you can add a comment to a cell using a statement like
Range("A1").AddComment "Hello"
But is it possible to add more text to that comment using VBA?
I tried things like
Range("A1").AddComment "Hello."
Range("A1").Comment = Range("A1").Comment + " How are you?"
but I guess I can't alter the comment that way.
View 11 Replies
View Related
May 18, 2008
im using comments to display images for easy look up
when i save a picture i want it to be that size when i hovver over the comment
but when i insert the picture it doesnt open the size that i saved it as
i manually have to resize the image so its legible
why is this and is there a way round this?
View 13 Replies
View Related
Oct 30, 2009
I was wondering if there was a way to add comments (that you see in spreadsheets) on a userform in vb editor. So that when you run the form and the user moves the mouse over a textbox then it displays the comment.
View 2 Replies
View Related
Mar 3, 2008
I am sure this can be done - I found a similar thread but in a different context to what I need.
I have a user of a workbook who insists on putting irritating red cornered comments in cells, rather than using the handy (and rather large) comments field I put in, especially for her.
View 9 Replies
View Related
Jul 26, 2008
I want to create a comments box whenever a cell is double clicked in sheet "Settlements"
View 9 Replies
View Related