vba code

  1. H

    Generate values and dates in cells based on custom condition using vba macros

    Hello, I have a task to generate a sheet containing following headers : Part Number, Quantity, Date The quantity to be produced is given in one more sheet and that quantity needs to be distributed in that particular month. For example: In the vba code, it has to refer the particular month...
  2. Jyggalag

    My email vba macro does not work

    Hi all, I have the current VBA code: Option Explicit Private Const FilePath As String = "S:\File Path anonymous\" Sub send_email_complete() Dim OutApp As Object Dim OutMail As Object Dim i As Long Dim ws As Worksheet Dim col As New Collection, itm As Variant Dim...
  3. K

    If cell has value

    I am in need of a code if Column K has value to insert next value into column N, if column N has a value to insert next value into column Q and so on. Please help!!
  4. Jyggalag

    Make excel macro refer to other sheet than itself

    Hi all, I currently have this code, which saves my sheet (entitled "Sheet3") as a PDF: Option Explicit Sub SaveFileWithMacro() Dim Path As String Dim fn As String Path = "S:\Path\PDF files\" fn = Range("A63") ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Path & fn & ".pdf" End...
  5. Jyggalag

    Save excel sheet as PDF (only one sheet)

    Hi all, I currently have a macro that converts my excel sheet into a PDF and saves it in a designated folder. However, I only want it to save the first sheet as a PDF, and ignore my other sheets, which it will not do at the moment. My code looks as follows: Option Explicit Sub...
  6. Jyggalag

    Have formula data appear as text, maybe VBA solution?

    Hi all! I currently have this setup, please note that I have hidden all the nonrelevant columns however: The formula I use is this (thank you @RoryA !) =IFERROR(INDEX(INDIRECT("'"&H504&"'!$U$3:$U$73"),MATCH(1...
  7. C

    Copy and Paste to last row

    In the midst of trying to automate a report and the final step is to take the 2 workbooks and copy all the data (excluding the header) from WB1 to the first empty row of WB2. The issue I'm having is that it when it copies from WB1 it will paste about 173 rows below the last row of WB2... not...
  8. An Quala

    Delete Rows which contains a specific text in a cell

    Hello, can anyone please help me to write a code which delete all the rows if Column AM in sheet "Sponsored Products Campaigns" has text as same as in sheet "Control Panel" Cell S7, so for example it will search the text from Cell S7 Sheet "Control Panel" in the Column AM sheet "Sponsored...
  9. C

    Copying Data from One Sheet to Second Sheet on a Daily Basis, but not overwriting Data from Previous Day VBA Code

    Good morning. I read the article concerning this question but the recommended code was not working for my intended application. I am looking for some help, please. I have an excel table for which I need to back up daily. I want to save new data (values only) each day without overwriting the...
  10. An Quala

    VBA Code Mistake

    Hello, can anyone please help me find out what is the mistake in this VBA Code, it is not giving any error but highlighted part is not doing what it needs to do (deleting the rows as per the mentioned criteria) Sub Xlookup() Dim c As Range, va, x For Each x In Split("Sponsored...
  11. An Quala

    Covert Data into Text with VBA Code

    Hello, so when I download this sheet from the web, it always shows this error "Convert to number", basically in few of columns (where there are numbers) it is stored as different format which does not allow you to sort with number and mathematical operations, I change it manually with...
  12. An Quala

    VBA Code for deleting complete rows if it has specific text

    Hi, so I need to delete the complete row if specific criteria is met, the criteria is as follows, In a sheet named called "Data" If column B contains either of "John", "David", "Susan", "Macro", few of them, or all of them, then delete those specific rows leaving the others (Note: If any of...
  13. L

    VBA coding Help - opening and copying several spreadsheets in a folder

    Hello there. I am a bit rusty with Excel and VBA following differing jobs not needing it so much, however I am now currently in a role where using advanced Excel and VBA would be extremely beneficial. I am currently stuck on something which I am guessing is reasonably simple, and google is not...
  14. S

    VBA code help to save exported file using the information in a cell

    Hi, I am not sure how to do this. I have code that is exporting a spreadsheet as a CSV file, but I would like to name the file based on information in Cell J2 on a spreadsheet within the workbook called Int_Check. Can you please help me modify the code to rename the exported file. I would like...
  15. S

    VBA code to add cell information to file name

    Hi all, I am working on a macro to save off a file. We would like to pull a few cells of data from a spreadsheet into the name of the spreadsheet. The start date is in cell B3 on the INPUT tab. How can we pull this into the file name using VBA? I think the dashes will cause a problem so we can...
  16. A

    Index Match Conditional Formatting using VBA Code

    Hi All Please advise on a VBA code which i can use with Index Match for conditional formatting. my conditional formatting formula is as below =(Combined!$A2=INDEX(Summary!$A:$A,MATCH(Combined!$A2,Summary!$A:$A,0))) I want to highlight cells (any colour) if any cell in Column A from the...
  17. Jyggalag

    Save file as PDF in VBA (macro)?

    Hi all, I currently have the following setup: I have marked everything that I want to be exported into a PDF, which works when I manually save the file as a PDF. However, I do also have a macro ("Save file to folder") as seen above, which saves the file (albeit as an Excel file) to my...
  18. Jyggalag

    Can somebody help me test my VBA code and fix it if it does not work?

    Hi all, I have this VBA code to write an email body text: eBody = "Dear person," & "<BR><BR>" eBody = eBody & " 1Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text (Text text...
  19. Jyggalag

    Create macro to separate first name and last name in email and plug it into columns

    Dear all, I am currently working on a spreadsheet that looks like this, albeit the real one is much larger: I was wondering if there would be some way in which I could create a macro or some VBA code attached to a macro where, once i press it, it takes the e-mails from C2-C12 and takes the...
  20. C

    Need URGENT VBA help ASAP with Data Entry Cell Macro

    Hi! I could really use some help ASAP . This project is due in 24hours and I have yet to find or work out a solution to my problem. I have a task manager workbook with several worksheets that I have created to allow for task management tracking based on completion dates. Weekly, monthly...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

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