vba

  1. L

    VBA Match function for two criteria / columns

    Seen many close answers to my simple question, but is there an elegant way to use the Application.Match function for 2 criteria to match against 2 columns key1 = "QI" key2 = "Episode" keycol1 = 2 keycol2 = 6 application.match on 1 criteria works perfectly row = Application.Match(key1...
  2. B

    Need code that converts colors from the RGB code to the Natural Color System (NCS)

    I have this spreadsheet with 255 RGB Codes. I need a code to convert them to the Natural Color System (NCS). I've tried AI solutions, which gave me VBA codes but they don't seem to work. Example of AI generated VBA code: Function RGBtoNCS(r As Integer, g As Integer, b As Integer) As...
  3. N

    Trying to extract URL and get it in correct order

    Hello, I am very new to VBA and I would like to understand how can I get this information in a "readable" URL format from this jumbled code. (pic below). As you can see the https:// is at the end and the other part is at the beginning. I have tried TEXT to Columns and separated it by " and it...
  4. L

    VBA - Run time error '9': subscript out of range

    Hi everybody I'm trying to write a macro to enable colleagues to sort a table on a protected worksheet. This table and worksheet are protected in regards to formatting to prevent unwanted changes to the tabel by colleagues who aren't very excel-savvy. Unfortunately, because of the locked...
  5. C

    Copy/Paste on the last active row of particular sheet

    Hello All. I'm creating a macro wherein data captured from SAP scripting will automatically pasted on another sheet of its last row i.e Range "A", what will be the starting script for this? Here is my sample script. I really appreciate any help you can provide.
  6. J

    VBA to search for duplicates, concatenate cells from another column and delete row

    I have the below spreadsheet data that I need to determine if there are duplicate values in column A, if there are, then the values in column B (where a match exists) should be concatenated together and the duplicate row deleted. Note: the data that needs to be checked for duplicates does not...
  7. T

    Using Excel, I'd like to show the page number on the first sheet, where the start other sheets can be found.

    I have a few sheets that are printed together to a single PDF file. I'd like to get the page number where each sheet will start in the PDF and include it on the first sheet that is part of the larger PDF. I found this a few other things that do not work...
  8. N

    Data Transformation using VBA like subtotal

    Hi All, I have excel file where I have approx. 38 columns but in order to create report I need only below mentioned headers from that report (approx 15 columns ). Logic :- 1) First remove all extra columns apart from below mentioned headers 2) Sort CPO column in ascending order and insert a...
  9. O

    User-defined type not defined - vba/excel error

    I am getting this error message popping up in a workbook I have, but not when I am running the macro (there's only one in the workbook at the moment). The macro runs fine with no errors, but any time I enter any data into a cell in any worksheet I get this pop up error message. I've looked in...
  10. D

    VBA Activate Code Emptying Clipboard

    Hello All. I have a workbook into which I have placed the following code which works as it should. This was done to prevent all following instances of Excel having hidden toolbar etc when opened while this workbook is open. The code below works and allows excel to opened ok with toolbar present...
  11. N

    Accessing a named range to insert a value does not work

    0 I have a piece of code that is trying to overwrite the value in a named range, but I am getting <Object doesn't support this property or method> Sub CheckStuff() If Evaluate("Table1RowCount") > Evaluate("Table1LastRowFixed") Then ActiveWorkbook.Range("Table1LastRowFixed").Value =...
  12. B

    How to make an action optional

    VBA Newbie here; I have built a macro to copy data from one spreadsheet to another, compiling multiple sheets from the source workbook into a single sheet in the target workbook. However, the report that spits out the source workbook does not always have the same number of sheets. Is there a way...
  13. A

    Worksheet named based on cell value

    Hi, first off I have gone through a number of posts that seem the same/similar to my request but the code will not work for me. I have 33 worksheets that I would like to be renamed by the value in A2 on each of those sheets. Ex. If Sheet3 has 12345 in A2, I would like that sheet named “12345”...
  14. CesarF

    Need Help Generating PDF Paginated Reports from Excel VBA

    Hello everyone, I'm currently working with data stored in SQL Server and need to generate PDF paginated reports using an Excel VBA macro. Ideally, I'm looking for a simple and efficient tool (preferably open-source) that can be integrated with VBA to automate the report generation process...
  15. S

    Finding Largest value

    I have "Asset ID" in Column A, and "Unit ID" in Column B. See Image of sample data below. I need to find the largest unit ID for a given Asset. I found: MaxSN = Application.WorksheetFunction.Max(Range("B:B")) But this only works if there are numbers - the SN messes it up. I tried using...
  16. B

    Excel VBA Searching Unique Variables to Match against Exported Schedule Files to Determine Date

    VBA Newbie here; I am attempting to use a sort of search function in a schedule that I create every day for work. In essence, the schedule that our software exports does not include the date that the finished good jobs are tied to; the jobs are scheduled per week, but that data is not shown in...
  17. C

    Create Folder Using VBA

    Hi all, Hoping someone can help me with this "Run-time error '76': Path not found" problem that im getting I have a sharepoint directly mapped to my C drive, and im using this code to try and create a folder in said directory but when running im getting an error my foldername required is in...
  18. S

    VBA Code that extracts multiple tabs at a time based on lookup tab

    I have a workbook with 70 tabs to be extracted, some individually but most in groupings. Ultimately, I need to send each senior director a workbook with a tab for each of their departments ("Cost Centers"). Each tab name represents the cost center name. For example, John Doe oversees Accounts...
  19. D

    Automatically add cell contents of specific range to cell comments when opening a document

    Hello, Is there a way to automatically add cell contents of a specific range to cell comments on opening a document (specifically after the data from external sources has been updated). The plan is to have a VBA code that: - Wait till the document has been updated from linked documents...
  20. T

    Error Number: 1004

    I've been trying to set up a macro that sorts data from one sheet (called 'data' in the macro) to various appropriately named tabs on a template sheet. The template has a helper tab that lists the appropriate tab names. I'm trying to loop along the columns to create a tab with each different...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top