excel-vba

Excel Searching and Return

最后都变了- 提交于 2020-01-17 12:42:09
问题 I want to search an excel file that has a list of names. All of the names are in random order. I want to be able to search for a string such as "Tom" and in return get ALL of the "Tom" strings with the data attached. So if there is a list of 500 names, and there are only 15 entries for Tom, I want the formula to pull all 15 entries and output them to another area of the spreadsheet. Also, is it possible to do this and then also return all of the columns that are associated with "Tom" to

Excel Searching and Return

删除回忆录丶 提交于 2020-01-17 12:41:08
问题 I want to search an excel file that has a list of names. All of the names are in random order. I want to be able to search for a string such as "Tom" and in return get ALL of the "Tom" strings with the data attached. So if there is a list of 500 names, and there are only 15 entries for Tom, I want the formula to pull all 15 entries and output them to another area of the spreadsheet. Also, is it possible to do this and then also return all of the columns that are associated with "Tom" to

Range Selection Using Excel Macro

删除回忆录丶 提交于 2020-01-17 12:37:25
问题 A B C 123455 XXX 99999 123456 XX 100000 123457 XXX 100001 174564 XXXX 100002 184567 100003 194570 100004 204573 100005 214576 100006 224579 100007 100008 I would like to write a macro for selecting a range using <ctrl> + <down arrow> The process should be like this Select cell A1 Select a Range with <shift> + <ctrl> + <page down> Aelect cell A1 without cancelling the range selection (using <ctrl> ) ActiveCell.Offset(0, 2).Select Then range select from C1 to C9 with <shift> + <ctrl> + <page

How can I count and log the number of rows in a sheet with a specific month/year value

旧城冷巷雨未停 提交于 2020-01-17 11:16:44
问题 I've downloaded a dataset which details all of the car accidents reported in England between January 1979 and December 2004 - this file is in csv format and is understandably quite large (6,224,199 rows, to be exact). Because the size of the file exceeds the number of rows that Excel 2010 can handle, I'd have to split the file into smaller ones in order to open it all at once in Excel. I tried using Notepad and Notepad++, but Notepad crashed, and Notepad++ refused to open such a large (720MB)

How can I count and log the number of rows in a sheet with a specific month/year value

▼魔方 西西 提交于 2020-01-17 11:15:56
问题 I've downloaded a dataset which details all of the car accidents reported in England between January 1979 and December 2004 - this file is in csv format and is understandably quite large (6,224,199 rows, to be exact). Because the size of the file exceeds the number of rows that Excel 2010 can handle, I'd have to split the file into smaller ones in order to open it all at once in Excel. I tried using Notepad and Notepad++, but Notepad crashed, and Notepad++ refused to open such a large (720MB)

How can I count and log the number of rows in a sheet with a specific month/year value

谁说胖子不能爱 提交于 2020-01-17 11:14:24
问题 I've downloaded a dataset which details all of the car accidents reported in England between January 1979 and December 2004 - this file is in csv format and is understandably quite large (6,224,199 rows, to be exact). Because the size of the file exceeds the number of rows that Excel 2010 can handle, I'd have to split the file into smaller ones in order to open it all at once in Excel. I tried using Notepad and Notepad++, but Notepad crashed, and Notepad++ refused to open such a large (720MB)

Macro to merge and concatenate cells in Excel for rows in which information on other columns matches

心不动则不痛 提交于 2020-01-17 11:14:12
问题 apologize if this is a common post, but couldn't find something that fully applies to me. It's a very similar post to (except that instead of just merging the 2 cells, i am looking to merge and concatenate): Macro to merge cells in Excel for rows in which information in other columns matches Referencing the image in the post above, what i am looking for are cells P2 and P3 to be merged and the data to be concatenated. For eg: if P2 had abc, and P3 had xyz, i am looking for end product to be

Cannot find the VBA macro assigned to the button in Excel

假装没事ソ 提交于 2020-01-17 09:09:09
问题 I got a workbook from someone else, and there is a button assigned with a macro (since I can right click and choose Assign Macro to actually see the macro name). However, I cannot find this macro in any Modules inside VBE as well as the code window behind ThisWorkbook and any Sheet (so it's not an event). In addition, I found that after I clicked Assign Macro option from right-click menu, I was switched to another worksheet that has several cells that looks like this, But it looks to me that

VBA Loop through Visible cells only

你离开我真会死。 提交于 2020-01-17 08:44:28
问题 I am using the below code to loop through each row however I only want to loop through visible cells in Column B (as I have filtered out the values I want to ignore) ranging from Row 10 -194. Does anyone know how I would do this? For X = 192 to 10 Step -1 If Range("B" & X).Text = "" Then **This needs to change to visible cells only but not sure how! Code required insert here Else End If Next X 回答1: A row height of 0 means the row is hidden. So you could check for that For X = 192 to 10 Step

Call a macro which name is in the text of a cell

百般思念 提交于 2020-01-17 08:19:50
问题 Please your help with the following: I need to call a macro which name is variable and is in cell C5 of Sheet1 of Workbook1. I need to run that macro in another workbook, let's say Workbook2. Code that I have (in Workbook1) so far is: Public Sub RS() 'Setting source worksheet and workbook where the macros are saved Dim ws1 As Worksheet Dim wb1 As Workbook Set wb1 = ActiveWorkbook Set ws1 = ActiveWorkbook.ActiveSheet 'Defining the cell that contains the name of the chosen macro to be run Dim