macro - if/then

  1. M

    Writing a Macro to determine the amount of work days between two dates.

    I am trying to write a macro that will compare 2 cells, then will take the dates corresponding to those cells and tell me the amount of week days between the 2 dates. The part I'm having trouble with is the IF i wrote Sub DateCalculation() ' ' DateCalculation Macro ' ' Keyboard Shortcut...
  2. U

    VBA: Vlookup and Separate

    Hi Guys, I'm trying to create a macro but having a hard time creating as I'm more on recording and there are some conditions that needs to be met. I have an excel file with 3 tabs: Sheet 1: Master Tab <tbody> ID Name 001 000 005 </tbody> Sheet 2&3: Source 1 & 2 (Format is...
  3. O

    Creating a macro to develop a string that uses corresponding column values

    Hello. So, we're streamlining our product database on a CSV file, and one of the values is a custom field column that we have to implement as part of a larger project. The cells in this particular column have to be written out as a string similar to this: "width=x;height=y;depth=z" There...
  4. B

    Hiding and unhiding multiple cells based on one cells values.

    Hello everyone, I'm not well versed on VB or Macros, and that will be Obviously apparent when you see my workbook. I'm trying to write a code that will allow me to hide and unhide sheets based on once cells value. However, my code writing is terrible. I've been racking my head for 2 or 3...
  5. C

    Macro Compile Error

    I am writing a macro that will insert a formula in an empty cell that will look at the value in a different cell and based on the last character in the value, enter at different value in the formula cell. It will then copy-down, then copy and paste as values. Below is the code I have written...
  6. C

    Slightly new to VBA. How to load B cell in C column based on A cell

    I'm not very familiar with the VBA part of Excel, more familiar with the normal in-cell formulas. I apologize in advance for technical errors. I'm working on organizing a bunch of data from a few sheets onto one separate sheet (same workbook). I have "Tag Value Names" and "Tag Values", such as...
  7. D

    VBA to find value

    I am using VBA to do some clean up to a work sheet after users enter some data. Every sheet is going to have only one instance of the following cell combination: <tbody> Some number T </tbody> So I want to find the value in the cell to the left of the one cell with a T in it, produce a...
  8. J

    creating rows generated from one master sheet

    Google Sheet Link First sheet is for generating the output in the second sheet. You can see there is no referencing currently. I included a couple minor notes in the first sheet. The challenge is how to achieve the same output in the most efficient, yet simplest way possible based on input...
  9. M

    VBA to show cell blank if cell value is same as cell above

    Good Day, I am very new to coding and would like to ask for assistance in writing a code to: Show the cell as blank if the cell above contains the same value. I would like to do this for a range of cells. Also the cell values may differ eg. Bahamas Bahamas Bahamas England England Unites...
  10. M

    Copy down formula to last row - VBA for BEGINNER

    Hello all, I am a beginner (with a capital B) to macros and VBA. I am recording a macro and trying to insert an IF formula into F2, and then fill the formula down to the last row of data. I think I can use Column A to determine my last row. I've read a few threads about this, but need help...
  11. C

    Run-time error '1004' Application-defined or object defined error

    Hi. I am having an issue with a macro I wrote that reformats a report I receive in Excel. One of the commands looks for the blank cells in column A and based on the content of column C, enters the appropriate value. Frequently, when I run the macro I get "Run-time error '1004'...
  12. I

    Code to update asset numbers automatically

    I have a list of asset numbers that are on sheet 1, column A. Then on Sheet 2, column A I have to enter the asset number (not in the same order listed in sheet 1, column a) along with the member its assigned to. However sometimes the asset numbers change... What I would like to have excel do is...
  13. I

    Row insert - vba code breaks

    Hello, Below code breaks - if any rows are inserted between row 5 and row 20. kindly assist in modfying below code. Private Sub Worksheet_Change(ByVal Target As Range) ay = Target.Row ax = Target.Column If ax = 10 Then Application.ScreenUpdating = False...
  14. S

    Combine two records into one based on a different tab

    Hello, I'm in the process of expanding on a macro to look at customer ID and the product name they ordered. If they ordered a set of a particular product then it will combine both product name into one and delete the oldest record. I have created another tab that combines the product...
  15. G

    Create Countif Macro to count blank cells if arguments from multiple sheets add up and post findings on a final sheet

    So I have three sheets "Yard", "Available spaces", and "Yard configurations" If cells in Column K of "Yard configurations" equals Yes, and Cells in column B in "Yard configurations" equals ParkingLocation then use text in Column C of "Yard configurations" to find the same text in column A of...
  16. J

    Copy some portion of the Sheet to different Sheet if Column will have some value

    I have two sheets, "Raw Data" other one "SH" I want a VBA code that if in the Raw Data sheet AH column there will be some value then the following of Raw Data sheet will be copied to SH sheet. Means the Row will be copied. For example if there will be some value in AH3 of Raw Data then...
  17. R

    Optimal pallet formula

    Hello everyone, I have an difficult problem and i do not even know if this is possible in MS Excel. The question is as follows: The Excel file should automatically calculate the amount of palletlocations needed for storage. <tbody> Boxes Monday Tuesday Variation 1 0 0 Variation 2 140...
  18. R

    Drop Box Macro Trigger

    I have a workbook that has a running master list of job candidates. In the master list there are columns such as candidate, recruiter, location, and other general information. One of the columns contains status information such as "offer extended", "offer accepted", "reneged", "declined", etc...
  19. T

    VBA filter grand total if blanks, if not skip filter

    Hello, I am trying to edit a macro with some pivot tables. I am extremely novice with VBA editing and I would be extremely appreciative of your help :-). The macro creates a pivot table and grand totals for monthly data. Sometimes the grand total must be adjusted with filters. At times I need...
  20. J

    VBA Macro to compare two dates in two sheets, then transfer relevant data to relevant column

    <!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent>...

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