#vba

  1. Z

    How to get my code to handle exceptions

    I have this macro that add a row after the last row that contains data, and populates this new row with values in different columns. see code below, it works perfect when a file contains the keyword "Rainguards", but if a file does not contain this keyword, the following error message pops up...
  2. Z

    Remove the value in column D

    I have this code that counts the qty of a certain item, adds a row at the end of the excel file to show the qty If the total qty adds up to 0, the code removes this new row, what if I just want to remove the value in column D in the new row instead of removing the entire row when the value is 0...
  3. A

    VBA Code - Update Pivot Chart Source with Variable Row

    I am still fairly new to VBA. I have been using S & LRGLOBAL throughout the rest of my Macros and would like to also use it for updating my pivotchart sources. However, I can't get it to update the chart even if I name it "S266", so I think it may be another part of the code that is stopping it...
  4. Z

    Offset partial values to the left

    I need to offset the first 3 characters in column O to the left, add them infront of the existing text in K (with parenthesis) ONLY WHEN the value in column F is P1 so in the example below, row 2, 7, and 14 have P1 in column F, after I run the macro column F on these rows will look like: (D B)...
  5. J

    Unprotect range, copy and paste range, protect range

    Hi All, I'm currently experimenting with unprotecting and protecting workbooks using VBA but have been unsuccessful in getting it to work for one of my workbooks. In row 1 which is a hidden, fully formatted blank row, I'm trying to unprotect a portion of that row (BP1:DR1), copy and paste...
  6. Z

    Move parts of the text from one column to another

    I need to use VBA to move the first 3 characters from column O to in front of the text in column K, so in the example below it should look like: J-7,4x8',Base,8"w,96" appreciate your help !
  7. A

    Paste Excel Charts to PPT Dynamically using chart name

    Trying to create a dashboard wherein the user can add details regarding the File Name, Sheet Name, Chart Name, Slide No and many more. The below code gives an error when it tries to copy a chart from the excel sheet (Subscription Out of Range). Not sure where am I going wrong. Can anyone help...
  8. Z

    Remove a specific row when the value in a certain column is 0

    I have this code that add up all the "CHAIN & EYEBOLT" in a entire excel file, count the quantity, and add a row to the end of the excel file with the quantity. This code is used on thousands of excel files. Sometimes some of these files contain 0 eyebolt & chain, for these, I do not want an...
  9. C

    #VBA, Conditional Formation using spreadsheet name from a cell value

    I started using VBA in excel I have a spreadsheet named "MasterReport" 1. this macro will create a new spreadsheet and name it with the value in MasterReport's cell "B2" (OldDatax) 2. the existing data will be copied and transferred to the "oldDatax" sheet everytime I run the macro 3. Fresh...
  10. Z

    Add a letter to the end of a value based on values in multiple columns

    Hello, see below, I need to add the letter "J" to the end of the value in column D, also changed the No to Yes (If J is already present, or if Yes is present, then do not modify these values) IF these conditions are met: the word "Brevard" is in column M on the same row, the word "sanitary" is...
  11. Z

    Replace multiple values to another value

    I need to change a group of values to value A, and another group of values to value B Below is what I have so far, and the code is not working. what am I doing wrong? Sub CleanUpOutlier() With Range("D1", Cells(Rows.Count, "D").End(3)) .Replace "F21222CJ-08"",F21222CJ-11"""...
  12. Z

    Group values in arrays then replace them with a new value

    I have a large number of excel files to clean up, any of the values contained in these arrays will be replaced by a different value Below is what I have so far, any help is greatly appreciated Sub CleanUpOutlier() Array1 = ("1", "2", "3", "4") Array2 = ("5", "6", "7", "8") With...
  13. Z

    Change the value in a column from Yes to No based on info from another column

    I have a few thousand excel files that need to be modified, one of the modifications is changing the value from Yes to No in column E based on value from column D. For example, if value in D is: F13345C, or F13355C, or F13365C, and if the value in E is Yes, this Yes will need to be changed to No...
  14. Z

    Find and replace values with a dash (-)

    I have a bunch of excel files that contain some values in column D Whenever there are values in this format, with a dash: F12314J-67" (yes with an inch mark at the very end), they need to be replaced with something like : F12314J I've been working on this for a while now and my code so far is...
  15. J

    Goal Seek with Excel Macro

    I am using a record of an Excel Macro for a Goal Seek function on Excel. The problem is that when I try to add a new row in my sheet (both above the cells running the Goal Seek or even in the middle of them), the Macro that i recorded cannot be used anymore and I need to record it again (the...
  16. A

    Read/Write data in Array

    The task is to extract data from the Source File (contains Multiple Source Sheets) based on the key word in the Dashboard column E and paste them into their respective Destination File and Destination Sheet. For Example: Extract data from the Source Sheet [ABC - Sheet Name] of the Source File...
  17. S

    Assistance in a code to clear excel caches in VBA

    Hello, I have a Macro that runs a solver when called. My requirement is to call the macro multiple times so that we can run the solver for particular number of times. But after executing the VBA code to run the solver, the code runs for 4 to 5 times but then throws this error : "...
  18. A

    Convert Variant to Range

    Trying to create a code which checks if the dictionary value exists in each cell and if exists then keep that range in memory using Union argument. However, I am facing error with Set Rng = MyRng(i, 1) Else Set Rng = Union(Rng, MyRng(i, 1)) line. Can anyone please help me understand what am I...
  19. A

    Copy data from Master File and Paste to their Respective file

    I have a source file from where I want to extract data and paste them to their respective destination file. Criteria is country names present in Column E - Row12 (Headers in Row11), in Column F I have the destination file path and name where I want the code to paste data. Column E Column F...
  20. A

    Extract data using Scripting Dictionary

    I am trying to extract data from Source file and paste it into their respective template file. Column E Column F Country File path Brazil C:\Users\ABC123\Desktop\Brazil.xlsx USA C:\Users\ABC123\Desktop\USA.xlsx Requirement: Copy rows from the source file which has the same country...

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