vba

  1. P

    Selecting cells by color in VBA

    I would like to select all cells in the dataset A2:F156 where the color index is 19 (light orange) or 40 (dark orange). I have uploaded a picture of my dataset below. I have compiled the following code: Sub SelectByColor Dim cell as range, rng as range Set rng = range("A2:F841") For each...
  2. P

    Conditionally format the last cell in each row with valuable data

    I have a dataset for wells and 5 treatment plants (TP1, TP2, TP3, TP4, and TP5), which extends from A1 to F841. The flow path for each well is such that the well flows to TP1, then TP2, and so on. However, sometimes the flow path does not extend all the way to TP5. I have manually entered "None"...
  3. P

    Copying yellow cells in a range to another column on the same sheet with VBA

    I have a dataset that contains yellow cells (each yellow cell represents the final treatment plant or TP in a flow path) from Range("A2: F841"). Since the yellow cells are spread out randomly among the columns A to F, I would like to use VBA to copy them all as a single range in column J. I am...
  4. C

    Split string based off character count with other data

    Hey guys, I have some data that contains "Long Text" as well as other data. Equipment Name ID Line Notes 1000333832 H.P. : 14.01 RPM : 2100 Serial Number : 243526 KD Manufacturer : DODGE Model : SCXT325A 1000333833 CFM : 3000 RPM Damper (Yes/No) : Yes H.P. : 75...
  5. M

    UserForm initially displayed and now doesn't - what did I do wrong?

    I am attempting to have a UserForm which contains a set of buttons to allow the users to display different sheets and hide the tabs for neatness. The UserForm should display at the top left of each sheet (i.e. where A1 is). I have used the code from Pearson Software Consulting with a simple...
  6. K

    Strike full line of selected text in form control textbox

    Hey, I am having trouble with my textbox 'correction' macro. What I want it to do is have the user select a line in a form control textbox. Then it should select the whole line and strike through it. The code I use to add lines to the textbox is as followed...
  7. L

    Converting data from matrix to list format

    Hi Everyone, Firstly, this forum is really great. I generally do my utmost not to post a new thread and read through other materials and try to work it out when I can. Here are some pre-existing materials on this topic that I already read through...
  8. D

    Select registers without best results by category

    Hi I Have a Table with a RANKING of employees like this: <tbody> NAME CATEGORY POINTS JOHN TECH 100 MARK AUDIO 99 PAUL VIDEO 99 SARAH TECH 99 ANDY TECH 99 CARL COMPUTER 99 RAY AUDIO 98 DANNY COMPUTER 98 ELLEN BAKERY 98 CHARLES BAKERY 98 FRED TECH 98 HARRY TECH 97...
  9. S

    Use VBA to generate SQL reports

    Hi I need help in writing a vba code which would connect to SQL and run a SQL statement to generate a report based on company name. The code should then save the output to the defined location in the excel data table The data table in excel has company names from b2:b50. Column C is a user...
  10. S

    Comparison between two data tables

    Hi I need a vba code which could compare 2 worksheets which has data in different sort order The data tables have no primary key and I need help in identifying how this can be compared to identify differences by reducing manual effort Once the data is compared between 2 worksheets, the code...
  11. S

    List all Open Workbooks in Combobox

    Hi I am trying to create a userform in a MASTER workbook where I want help in listing all Open workbooks including CSV files listed in a Userform combo box. This combobox should include all open workbooks including the ones which are not saved in the local drive. The master WB should be...
  12. B

    Search Folder and Sub Folders and display Information

    I found this great article (http://www.xl-central.com/list-the-files-in-a-folder-and-subfolders.html) and it is exactly what I needed. I’ve tweaked it to reflect my circumstances, my issue is, I’m trying to pull certain cell Information rather than all the information about the file itself...
  13. R

    Extracting PARTIAL words from cell

    I'm in a worksheet and trying to extract the words after the 3rd and 4th hyphens when they're available in column A (see table below for representation). <tbody> Digital - workbook - sheet Digital - workbook - app Digital - workbook - test Digital - workbook - sheet - max - version1...
  14. E

    VBA Target.Address for multiple cells

    Hello, I have the below code that works perfectly if you enter/copy data one cell at a time. But I copy/paste multiple cells all the time, at which point the code below gives me an error. Is there a way to adapt the below code to work with multiple cells changing at the same time? Private Sub...
  15. S

    Remove old connections with VBA

    HI, I have seen multiple posts about removing old connections using VBA but they remove all connections. I have a sheet with 62000+ connections that have built up over time and would like to remove them and retain the 100 usable connections. Is there a way i can filter against the "Last...
  16. B

    VBA: File Character Count

    I was wanting to see if there was away to add some code to my personal workbook so when I open and or save a workbook where the file path is more than 218 characters I will get a prompt telling me Ive exceeded the recommended character limit.
  17. S

    how to get a worksheet to update without opening another workbook and without using vba

    Hi All, I have a workbook that pulls data from another workbook. At present both workbooks have to be open for the data to pull through. What I am wanting is a way to pull the data from 'workbook1' to 'workbook 2' without 'workbook 2' being open. I cannot use vba as I also have another workbook...
  18. V

    Declare a variable to a cell

    Hi everyone! I've been stuck with declaring a variable to a cell value and need some help. Situation: I have a code that filters a table and transfers the filtered data to another sheet. The filter could be the date value but I can't set it properly. The result is always Error 1004. I've tried...
  19. B

    VBA Challenge! How do i save the fidelity of a VBA Hyperlink?

    Hello everyone I would like to thank you all in advance for your kind help, I have a good working knowledge of excel, BUT I am rather new to VBA and I could really use some of your help. So I was able to create a simple formula that looked at cells Sheet2 A8 and B8 to create a hyperlink in C8...
  20. S

    Excel VBA to extract 2 or 3 keywords left and right from cell content

    Hi Friends, Trying to extract 2 or 3 keywords from cell content through excel vba. Sheet1 ColumnA has rows with content sample file attached. I need vba to search for keywords from sheet2 ColumnA in Sheet1 and extract 2 or 3 or 4 keywords from each row content into sheet3.(Popup box would be...

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Macro to copy values across rows and transposing them and add the user id
    [FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT][FONT=Calibri][SIZE=3][COLOR=#000000]Hi,[/COLOR][/SIZE][/FONT] [FONT=Times New...
Top