visual basic

  1. S

    Excel - Parse Data and Categorize Based On Criteria

    Hello. I am trying to do the following: I have a part numbers listed in Column A. Based on how the part number starts, I want to categorize it appropriately. Based on the following: A1 = has part # (PLM123-ABC) I want B1 to return 1 (for the category) A2 = has part # (ABC-123-XYZ) I...
  2. S

    Excel VB Code to open another excel file (variable)

    Hello. I have the following code that works. Sub sbVBA_To Open_Workbook() Dim wb As Workbook Set wb = Workbooks.Open("C:\Users\testuser\Desktop\export\order1.xls") My question is... can the current vb code be changed to accommodate any file name? Meaning I will export one file to the...
  3. S

    Excel - VB code to default to print 1 page

    Hello. Hopefully this is simple. I have a file. text.xls... tab name is sheet1, I want to print just one page. I want it to default to do this everytime. Can I add VB code to do this? Seems like anything I do on the print screen, is not saved the next time I open it up. Thank you.
  4. K

    Print Forms with data

    I am in an internship in a company, I was offered a job in VBA that I am not able to do, the project's goal is to take a print of all forms of the application and export them to PDF with the data that I was inserting throughout the process and insert those forms in a folder whose name would be...
  5. A

    Adjust SumByColor to allow to sum by another variable

    I currently have this, but don't know how to add it to sum by both colour and another column. Assuming the numbers are all coloured by their status, I need to sum based on that as well as the category in column A - how do I adjust the VBA code below to allow for that? Category Month A Month...
  6. N

    VBA to Javascript

    Is anyone here a whiz or genius at both VBA and JavaScript? We are looking to move a certain important document to Google Sheets which contains a hideous amount of VBA for the macros within it, in order to simplify things (they search for very certain information across various ranges of data)...
  7. S

    VB Code to Open Save and Close xls file

    hello. i have the following code that is working. the only issue i have is that the template file grows in size and gets too large...as my process loops. i simply want to add code to open, save and close the template file. here is the code...
  8. S

    Excel 365 - VB script - Template File Getting Too Large

    Hello. I currently have a working vb script in access. 1. Takes a template.. abc.xls 2. opens up the template 3. exports customer data into particular tabs within the template 4. saves and renames the template according to the customer name 5. script then picks the next customer and repeats...
  9. A

    vba to check to see if a a cell equals a ranged list

    Hello, I'm new here but I have used this forum quite a bit. I currently have module that calls to the below code any time a cell is is changed in a sheet. It takes a little bit of time to execute the code, a fraction of a second maybe, which is too much for what I'm doing. Is there any way to...
  10. T

    .formula has VBA error when using special characters

    I have an excel macro that loops through table body cells on each worksheet and inserts a cell formula using a combination of text strings. There are three worksheets. The macro works fine on worksheet 1 and 3, but on worksheet 2, the macro errors out with an application-defined or...
  11. D

    How to call variables in excel macro?

    Hello, I have never coded in visual basic before. I am trying to create a macro that will graph a ton of data. I made a quick program using the "record" function, then tried to mess with it to get the rest of the data graphed. This is what I have come up with so far: Sub Graphing2() ' '...
  12. A

    Percentage Color Coding Question

    I have a column of numbers (in percentages) which is a part of a pivot table. I need to color code this column as follows: - Percentages above 95% "Good" - Percentages >= 90% and lower than 95% "Neutral" - Percentages < 90% "Bad" I would like to use Excel Styles for colors. I have written...
  13. R

    VB Code (Reference a cell to a IF/Vlookup)

    Hello. I am trying to do the following in VB. Reference a cell to a IF & Vlookup statement. Here is what I have currently. Z is a variable that works...data can range from line 6 to line 1000. ---------------------------- Private Sub Reset_Pricing_Click() (works) For Z = 6 To 1000 (works)...
  14. I

    Bespoke barcode code.

    Basically, looking for a start point with this project and what would be the most effective way of achieving it. I've attached an image of the outcome I'd like to achieve. I'll have a print out of all these barcodes and what I want to occur is that when I scan for example barcode 1 is it will...
  15. A

    Saving content of individual cells within a column as separate JSON files

    Is there a way to create a collection of JSON Files in a folder based on the content of individual cells in a column in excel? So basically, I have a spreadsheet with a column starting with cell B12 to B26. Each cell contains a JSON script. I want a VBA that would convert each of these cells...
  16. H

    Excel VBA Will Not Recognise AutoFilter Is Enabled

    Excel vba will not recognise that AutoFilter is enabled. However, it works on the initial sheet which the code is run from. Using code: If ActiveSheet.AutoFilterMode Then Option 1 Else Option 2 End If I have tried to use vba prior to the above code, to remove and re-add the...
  17. L

    How to VBA Json parse an output with same name value on multiple levels

    Hi I have a json outfile that looks like this. As you can see both the name "data" occurs twice in the structre, and below "stages" each stage "ID" have the same name "ID" - I am trying to get all the different stage "id"s into 10 different colums (and then go through all objects to fill those...
  18. P

    External Table is not in the expected format - ms access 2013

    Hi. I am running the following vb command from access 2013. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "123", "c:\test\test.xls", True Access 2013 - Excel 2013 The table 123 is created but the external table is not in the expected format appears and when I click on debug...
  19. motherteresa

    Change Color of One Cell IF Another Cell Changes Value in ANY way

    I hope the title is accurate. Looking for a solution through Conditional Formatting for the following: Values in cell L14 AND L15 change. (Both values in L14 & L15 shown to user of WB are a result of a formulas placed in those cells that draw from info somewhere else in the WB). When the...
  20. P

    Modifying a Macro to Produce Reports

    Hello everyone, I am a big fan of this forum and have used it to solve many problems by searching through here (I only recently registered). I recently used a Macro created by hiker95 several years back. I am using this macro to sign in/out patients at my facility instead of a paper sign in/out...

Watch MrExcel Video

This Week's Hot Topics

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
Top