I'm importing some data from an HTML table into excel, it all formats pretty well except that some of the data appears on multiple rows.
A B C
1 01.02.06 John
2 Bob
3 Sam
4 02.03.06 Jim
What I need:
a b c
1 01.02.06 John, Bob, Sam 3
2 02.03.06 Jim 1
What I need to do is get all the items in the colum B which are listed under the same item in column a, in the first case John Bob and Sam and put them all into the same cell. I then want to delete the empty rows. It's important that this is done by testing to see if column A is blank, rather than using the date.
then in column C I want to count the items in column B,
ideally then repeat the script for the whole sheet.
Not a clue of the type of syntax I should be using though!
In fact there's probably a better way of importing the data from the HTML so it doesn't even need to be done this way! of course I'm oblivious to it. Auto Merged Post Until 24 Hrs Passes;Thinking maybe I didn't make myself properly clear....
If a cell in column a is empty then it means the item in column b needs adding to the end of the item in the row above in column b.
I have a set of data with 5 columns. The first column is ID. Now I have the same ID recorded several times with different data (in the other 4 columns) against the ID. I want to concatenate the data with the same ID into the same row. The data has already been sorted by ID. If it is the first time this ID appears, record the whole 5 columns. If the ID appears again, then record only the 3rd, 4th and 5th column. When I run my code, I got error 'subscript out of range (Error 9)' . It seems that the array I use has only 5 columns. But I don't know how to modify this.
VB: Sub Patient_Detail() Dim n As Integer 'index of rows to record to Dim i As Integer 'index of column to record from
I have a large list of text in one column which i need to combine between blank rows into one cell or a new column, the number of rows to be combined varies.
for example
aa bb
ww xx zz
rr
gg hh ii jj
would become
aa bb ww xx zz rr gg hh ii jj
I have over 30000 lines so doing it by hand is not an option.
I want to combine each row in column A that contains data (so stop process when the next cell is blank) into one single cell. However, each time a row is added I want it to have a new line, except for the last one. I don't know vba that well. I came up with something.
Basically I want to do this: =A1&char(10)&A2 VBA Dim i As Integer i = 0 Do While Not IsEmpty(ActiveCell.Offset(0, -1)) If (i = 0) Then ActiveCell.FormulaR1C1 = "=RC[-1]" i = i + 1 Else ActiveCell.FormulaR1C1 = "&CHAR(10)&R[i]C[-1]" i = i + 1 End If Loop
I need a macro to delete each row in which all cells contain the same value, always starting in cell G2 and going out an indefinite number of cell's. So, for one run, the range could be G2:BU2 and another it could be G2:PW2. Also, the number of row's is indefinite.
And an added complexity: I need it to ignore the cell in this search process if the cell contains "NC" - so if all the data in the row is the same except for a few that say NC - then it gets deleted. If the any of the cells in the row have other values, then that row does not get deleted - even if it contains "NC".
A friend is trying to change an entire row's color based on a specific cell's value in that row. He cannot use conditional formatting. This is the code he's tried, to no avail:
Sub temp() totalrows = ActiveSheet.UsedRange.Rows.Count For Row = totalrows To 2 Step -1 If Cells(Row, 25).Value = 4 Then Rows(Row).Select Selection.Font.ColorIndex = 3 End If Next Row End Sub
if B2 value (red column) of datahave tab is equal to B2 value of red column in lookup tab then B2 value (red column) of datahave tab is equal to A. if B2 value (red column) of datahave tab is equal to B3 value of red column in lookup tab then B2 value (red column) of datahave tab is equal to B. if B2 value (red column) of datahave tab is not equal either B2 and B3 value of red column in lookup tab then B2 value (red column) of datahave tab is equal to H.
[code]....
i tried normal Hlookup but i do not know how combine multiple IFs to solve my problem.
I have two formulas that I have worked out to deliver the results independently. I would like to join them together into one formula and add an If condition that if the two match then add a "+" to the end of the string.
#1 finds the base value : =IF(ISERR(FIND("/",I2)),I2,LEFT(I2,FIND("/",I2,FIND("/",I2)-1)-1))
#2 verifies the value is a valid color: =INDEX(M1:M41,MATCH(J2,M1:M41,0),1)
I would like to join the two formulas together and if they match then add a space, " " and a "+" to the end of the string. If there is no match then return the base value.
I have so data I am trying to combine based on count value of investment on Col A. If it appears more than once on col A then I want the col B values on col D. I have macro that works but I need make sure if Col B have any TRAC and TRL1 then I want to add that on Col D. For example so Col D1 would be EURX, TRL1 at 83.50, FTID and Col D5 would be TRAC at 87.88, Markit. Below is the macro.
I am self-taught (arguably by a pretty shoddy teacher), and am determined to figure *some* of this stuff out. I need a code to look at the rows on one worksheet and based on the value of column A for each row, copy cells A through E in that row to cells A through E of a blank row on a corresponding worksheet. I found a code from another post that does just what I need it to with one small exception. The code was posted by DaveGuggs and is as follows:
I did a search to find a question similar to mine and I found this: Copying data matching a criteria into another spreadsheet
This is exactly the same concept I am trying to accomplish, but don't know how to...at all. I couldn't follow the thread either.
I have a schedule which is constantly being updated (simplier version attached). I want to create a schedule, which will: 1) First ask which region to display the information for (I would like to create the same pop up menu to choose from) 2) Then, it will select only that region's information (all rows & columns) and copy them into a new worksheet and lists it all -if you go back to the Master List, you can again choose another Region and it will create another new worksheet with that region's information 3) Don't know if this is making things more complicated, but at the bottom of the attached file, there are 3 lines under "Land".
Is it possible to list these under the same spreadsheet as the region it is pertaining to but classify it separately under "Land" (ie leaving space, so it is clear this is separate
I have a column of data that will vary in length and I'm trying to write a macro to combine it all into one cell. Basically I need to do the equivalent of entering "=A1&A2&A3..." for the entire column. I started by creating an array string variable and have the data in grp() but now I'm stuck trying to figure out some sort of loop to keep adding onto the same cell or something
I want to combine both an 'if' and a 'vlookup' within a single cell. So I want to say if the value in cell a1 can be found in columns c1:d100 then return a 'yes' if not return a 'no'. How do I do this
I am doing financial ratio analysis of a company for five years and I need to show the ratios in a trendline. I have generated seperate line charts for each ratio, but I want to combine the charts and have multiple trendlines for multiple data series in a chart.
I am trying to combine ~300 workbooks into one single workbook. All 300 workbooks have the exact same header. I tried using the code from thread http://www.excelforum.com/showthread.php?p=696435 but nothing is being copied over. The only difference between my example and the other is I only need to take data from the first sheet in each data workbook. All the workbooks are located in following directory .....
I have 2 sheets with a list of account numbers and values on each (Column A = AccountNumber, Column B = Amount) I want to combine this on Sheet3 which should include all accounts on the other 2 sheets. Some AccountNumbers only exist on on one of the sheets.
how can you combine all data from different workbooks in to one workbook. i have 544 workbooks to combine. here is a sample screenshot of the table i need to combine.
it consists of 9 columns. rows are not consistent in number and sheets are named with numbers starting from 001 to 999 ....
I'm looking for a way for Excel to combine formulas together into a more compact form for me.
Attached is a very simple version of what I want, my actual formulas are very complex but I'd still like a way to have them automatically combined into a single cell.
Alternatively, what is a good way to break down a very complicated one-cell formula and still keep things organized?
Here is the one-cell version of a formula I work with.
[Code] .......
That formula is difficult to work with in one cell, so on another sheet I have it broken down into parts so that if one part isn't doing what I want I can change it. This takes up a LOT of space because of the other steps I do (the above formula is just one step) and I'd like to combine it together.
Attached File : Excel Formula Combination Question.xlsx‎
I've pieced together code from a number of solutions on the forum and figured out how to find the files I need to process, but can't seem to figure out the code to actually combine/append each worksheet into a single one. I've searched the "sea of options" on this forum and managed to do one thing well. Pardon all my notes embedded in the code below, but if I don't do it that way, I'll only confuse myself further (which is easily accomplished) ... or lose my notes!
I’m going to run this code from an add-in menu, which is already created and working (yeaah!) … so (I think) I need to have the code either create a file named "Master (Combined).xls" in the target folder ... or ... have a file already created in MYFOLDER and have this code delete all but the header row when the file is opened(???) The "Master (Combined).xls" workbook needs to consist of one worksheet named "Master". I want it to open the current workbook (.foundfiles(i)), select all the data, and append it to the master workbook on the "Master" worksheet (sheet 1). The Master Worksheet in the Master Workbook needs to start out as a blank sheet ... except for the header row. I can add code to put the headers in at the start, if necessary
Sub g_CombineMultWB_AllXLSFiles() ' This Will combine all XLS files located in the ' S:DMSMSPOMSMaster POMS NIIN DataMaster EMALL Data FilesEMALL Excel Folder ' into a single worksheet in a newly created (or previously existing) workbook ' ' LOCATION OF FILES (ACTUAL): ' S:DMSMSPOMSMaster POMS NIIN DataMaster EMALL Data FilesEMALL Excel Folder
Dim i As Integer Dim wbResults As Workbook Dim wbCodeBook As Workbook Application.ScreenUpdating = False Application.DisplayAlerts = False Application.EnableEvents = False ' Application.CutCopyMode = False ' DO I HAVE THIS HERE FOR A REASON???
On Error Resume Next
Set wbCodeBook = ThisWorkbook Const MYFOLDER = "S:DMSMSPOMSMaster POMS NIIN DataMaster EMALL Data FilesEMALL Excel Folder" With Application.FileSearch .NewSearch ' Change path To suit.............................
I've got problem with combining 3 cells into one. First cell contains text, second have date yyyy-mm-dd and last one is as previous. I'm using formula .
[Code] .....
And I'm getting: TEXT_41694_41701. How can that be corrected to use formatting for date format to get TEXT_yyyy-mm-dd_yyyy-mm-dd?
I have 2 pivot tables in an Excel Sheet (Pivot A and Pivot B). They have different structures i.e. the table headings are different. I need to sum the "Grand Total" values from each of these pivots. Can anyone explain if the following is possibe:
1. Can you combine 2 pivots with different structures in order to acheive a single Grant Total value?
2. Can I create a formula which adds the 2 separate Grand Total Values?
I need to combine around 20 columns into one single column, then I also need to insert open and close html tag for each column moved. See attachment example or information below