Add A List Of Numbers In A Column - Excel For Mac - Office Support

How to Add Up Columns in Excel In this Article: Using the Columns Using Separate Cells Community Q&A This wikiHow teaches you how to add two or more columns together in an Excel document. Mac

I actually just created a module in VBA which does all of the work. It takes my ranged list and creates a comma-delimited string which is output into the cell of my choice: Function csvRange(myRange As Range) Dim csvRangeOutput Dim entry as variant For Each entry In myRange If Not IsEmpty(entry.Value) Then csvRangeOutput = csvRangeOutput & entry.Value & ',' End If Next csvRange = Left(csvRangeOutput, Len(csvRangeOutput) - 1) End Function So then in my cell, I just put =csvRange(A:A) and it gives me the comma-delimited list. You could do something like this. If you aren't talking about a huge spreadsheet this would perform 'ok'. • Alt-F11, Create a macro to create the list (see code below) • Assign it to shortcut or toolbar button • User pastes their column of numbers into column A, presses the button, and their list goes into cell B1.

Add A List Of Numbers In A Column - Excel For Mac - Office Support

Here is the VBA macro code: Sub generatecsv() Dim i As Integer Dim s As String i = 1 Do Until Cells(i, 1).Value = ' If (s = ') Then s = Cells(i, 1).Value Else s = s & ',' & Cells(i, 1).Value End If i = i + 1 Loop Cells(1, 2).Value = s End Sub Be sure to set the format of cell B1 to 'text' or you'll get a messed up number. I'm sure you can do this in VBA as well but I'm not sure how at the moment, and need to get back to work.;). Muncherelli, I liked your answer, and I tweaked it:). Just a minor thing, there are times I pull data from a sheet and use it to query a database. I added an optional 'textQualify' parameter that helps create a comma seperated list usable in a query. Function csvRange(myRange As Range, Optional textQualify As String) 'e.g. CsvRange(A:A) or csvRange(A1:A2,'') etc in a cell to hold the string Dim csvRangeOutput For Each entry In myRange If Not IsEmpty(entry.Value) Then csvRangeOutput = csvRangeOutput & textQualify & entry.Value & textQualify & ',' End If Next csvRange = Left(csvRangeOutput, Len(csvRangeOutput) - 1) End Function.

I improved the generatecsv() sub to handle an excel sheet that contains multiple lists with blank lines seperating both the titles of each list and the lists from their titles. Example list title 1 item 1 item 2 list title 2 item 1 item 2 and combines them ofcourse into multiple rows, 1 per list. Reason, I had a client send me multiple keywords in list format for their website based on subject matter, needed a way to get these keywords into the webpages easily. Is my preferred method, but it doesn't work if you're dealing with more than a couple thousand rows, and may break for even fewer rows if your computer doesn't have much available memory.

Best practice in this case is probably to copy the column, create a new workbook, past special in A1 of the new workbook and Transpose so that the column is now a row. Then save the workbook as a.csv. Your csv is now basically a plain-text comma separated list that you can open in a text editor. Note: Remember to transpose the column into a row before saving as csv. Otherwise Excel won't know to stick commas between the values.