activecell.formular1c1

  1. S

    Excel VBA FormulaR1C1 Error 1004

    Hi, I am getting 1004 error for the following code, i have checked through many time and still unsure why.. ActiveCell.FormulaR1C1 = "=IF(" & buffer2(0) & "=""yes"",IF(" & buffer2(1) & "=0," _ & buffer2(2) & "*0.07,SUMPRODUCT(" & buffer2(1) & "," & buffer2(3) & ") * 0.07),0)"
  2. A

    Help adding loop

    hello all! i am learning to code, and have 7 books but still have such a hard time understanding loops. i'm desperate for help. My boss wants me to loop through a years worth of files and pull data. I tried for days, and am just not retaining the rules behind the action. I hope someone will just...
  3. tlc53

    VBA Code - Closing Statement Wrong Perhaps

    Hi, I have the below code which is returning an error, I believe near the bottom. It says I need to "End With" but when I put "End With" before "End Sub" it says it wasn't expecting "End With" :banghead: I'd really like this to run without any problems. Can someone please show me where I am...
  4. V

    Macro help

    Hi, I have recorded the below macro. However it is taking loads of time to run. Is there a way to ensure macro will delete old data on the file (with click of a button) and let the user start a fresh. Same time it won't take time to run. The vlookup should be done only if columns C as value...
  5. J

    VBA using FormulaR1C1 and multiply value from other sheet then if zero delete row

    Hello, I am new to VBA but trying to learn. I am trying to have a sheet that has 2 Macros, the 2nd Macro will send the data to an IE webpage, this part I have done. I Recorded my Macro to copy values from one sheet to another and do some multiplication, this is where I get stuck, the Webpage...
  6. S

    Adding columns to multiple worksheets

    Trying to create a macro that will add 2 new columns A & B with headers to each sheet in workbook. This code works to add columns for all worksheets, but only puts the headers in the 1st worksheet. Sub Insert_Columns() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets On Error...
  7. Joesif

    Macro Help

    Hello, I am a noob to VBA and macros. What I am trying to do is copy text into the middle of my formula which is a sumif formula...
  8. L

    Manually run VBA on specific cell range

    Hi, Firstly thanks for looking :) I have a spreadsheet were I need to reset a range of cells, I have recorded a macro (see below) which will reset the range. There are 1100 ranges in total. What I am asking is, is there a way to click on a cell, any cell and run the below code. I know the...
  9. Belair58

    Loop through all WorkSheets is not working, code review please.

    Hello, I have a workbook with multiple sheets and I'd like to run this macro on all sheets. The code below will run on the first worksheet, but not on all. If anyone can see why it's not looping through all the sheets I'd appreciate it. <Code> Sub Add_On_Time_Or_Not_To_Each_Sheet() Dim ws As...
  10. D

    Copying a vlookup code on newly created document not working

    Hello everyone, I'm attempting to use a vlookup formula within my VBA code. I recorded a macro and attempted to remove as much noise as I could. However I continue to receive a "Run-Time error '1004' Application-defined or object-defined error. The code in bold red is the line of code that is...
  11. D

    Follow up question on VBA coding for Top 5 Customers.

    I have a followup question to an earlier post. The formulas are all working great. However, I need for the coding to overlook 3 customers when selecting the "Top 5 Customers". These customers are GMIT, BGS GRM, and GMIT SC. I'm not sure how to incorporate this into what I have currently...
  12. C

    Excel VBA Macro for Automatic Sequential Invoice Number Generator upon opening that works for a shared document

    Hello, I am a beginner with macros and am having trouble. I have created a macro that creates a new sequential Invoice number upon opening a protected document. My issue is that several people in the company will be using this same document. How can I make sure that If several people have the...
  13. J

    Looking for a way to loop this

    This may be an easy one but I am just starting to learn all of this. below is a code that works great, only i would have to type it over and over again until i reach row 250 :( i want to loop through the E Column cell rows from 2 - 250 until it reaches the end. Any help would be greatly...
  14. Belair58

    Help with concatenation of a formula.

    Hello, I'm finding the last row with data in my range and then I'm attempting to use the cell number in a formula. ''' firstRow = sht.Cells(sht.Rows.Count, "D").End(xlDown).Row lastRow = sht.Cells(sht.Rows.Count, "D").End(xlUp).Row Range("E1").Select ActiveCell.FormulaR1C1 = "Late /...
  15. Belair58

    Hopefully an easy Input Box data question...

    Hello, I have a macro that is pulling data from a sheet Cycle_14a_Output.txt. There will be multiple sheets used for this project, all name Cycle_XXa_Output.txt. I've added an input box to ask what the number of the file should be. How can I add the Input Data into the formula string? <Code>...
  16. B

    Macro Error

    Hi All, I'm relatively new to creating macros but have been working on the attached code for some time, unfortunately it ends with an error which i haven't been able to eliminate. The problem line is highlighted in red text. Any help on the associated error would be much appreciated. Thanks in...
  17. H

    Need Macro Help -

    Hello I have below Data - and my end goal is to reach the data in next column - I have already recorded the macro but I want it to run till there is data on the left hand column - in my example I have only 20 rows. so what I am doing I just takin left data and adding it"" example - if 123 ---...
  18. B

    Help with formula

    Hi Guys, Thanks in advance for your help!!! I am trying to edit an existing sheet that we have at work. There is a button that clears all previous records and then a 2nd button that resets the formula. (The VBA for resetting the formula is pasted below) When I hit the reset button all cells...
  19. D

    VBA with sumif syntax issues

    Hello I did my best to post using everything suggested but this is the best I can do. Here is a spreadsheet I am trying to work with. It is basically up to 200 rows and using columns A:H. I am also attaching my vba code. The code will add titles, formatting and some formulas. I am having...
  20. S

    Finding last row of data

    Hi, I use the same bit of opening code on just about everything I ever work on (I know there are a lot of different ways of doing this): 'Finds last row of data on the Altos billing Nov 18 calls Sheets("Altos billing Nov 18 calls").Select LastRowWithValueAltos = Columns("A").Find("*", ...

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