insert formula

  1. U

    VBA Insert Formula and Find Text

    Hi Guys, Can someone help me how to simplify this code? Sub Macro2() ActiveCell.FormulaR1C1 = "=RC[3]&R1C2&R[1]C[3]" Selection.Copy Range("A2").Select Selection.End(xlDown).Select Range("B1596").Select Range(Selection, Selection.End(xlUp)).Select ActiveSheet.Paste...
  2. J

    Convert Array Formula to R1C1 style

    Hello, does anyone know how to insert an array formula using R1C1 style? I am attempting to convert the array formula (with absolute/relative references as shown below). Sub Insert_Rows() Dim Sh As Worksheet Dim End_Row As Long Dim N As Long Dim Ins As Long For...
  3. J

    Find Text (multiple times) in column C - insert array formula - drag down - paste values

    Hello, I am looking for a macro to search column C and insert an array formula one row below every occurrence of "Resource Description." Then, in column A of each row that a formula will be inserted, there is a number - which calculates how many rows to drag this array formula down. After the...
  4. I

    Lookup, match, change cells, then multiply across tabs VBA

    okay i just started using VBA/macros today and im pretty pleased with my progress so far :) but hit a brick wall i think above my pay grade... not looking for a bailout i'd like to understand this for the future. My job could really use these.... Data tab called "Quotation Tool": <tbody>...
  5. J

    Macro to insert Concatenate formula with "-" between values (using R1C1) Not Working

    Hello, any thoughts on why the below macro is resulting in a runtime error 13? I am trying to concatenate the values in column N and DO with a "-" in the middle. If I remove the "-" it works..... just not sure why I cant put a "-" between the two values. I also tried without "" and it doesn't...
  6. R

    Insert fumctions in other sheets where the address of the target cell varies

    Hello. I have an application where I want to put a formula in one sheet of a workbook where the formula addresses another sheet. I am trying to use code such as this: ActiveCell.Formula = "=summary! & Cells(LastRowNo + 1, 5)". Although I know this syntax is incorrect, I hope it is sufficiently...
  7. B

    Bug when inserting formula with VBA

    Hy everyone I have got this weird bug, which I can't understand. With the following code in VBA I try to insert a formula: For Each Cell In Range("A28:A102") If Cell.Value <> "" Then Cell.Offset(0, 1).FormulaR1C1 = "=COUNTIF(Januar_Data!J:J,RC[-1])" End If...
  8. C

    Attempt to put sum formula in cell by using VBA

    Dear all, I don't understand why a particular line of code doesn't work. This is the code: .Cells(624 + i, 2 + j) = .Cells(624 + i, 2 + j).Formula & "- SUMPRODUCT(" & .Range(.Cells(288 + game, 3 + 14 * j), .Cells(288 + game, 16 + 14 * j)).Address & ";" & .Range(.Cells(315, 3 + 14 * j)...
  9. P

    Find cell and insert formula

    I am new at VBA and need some help with some code I am working on. Here is a sample of my spreadsheet: <TABLE style="WIDTH: 160pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=213 border=0 x:str><COLGROUP><COL style="WIDTH: 16pt; mso-width-source: userset; mso-width-alt: 768"...
  10. J

    Inserting a a totals row every nth row.

    I have a list that looks like this: Site-----Month--Use Site A----Jan---10 Site A----Feb---5 Site B ----Jan---12 Site B ----Feb---6 Site C----Jan---5 Site C----Feb---3 I need something that will insert a row underneath each individual site grouping and that will sum the use column to look...
  11. F

    Macro to insert excel function in cell

    Hey there, I would like my macro to insert a function into a cell. The function works in Excel but if I use the function in my macro it gives an error. Any idea how to write it correctly? Sub Prepare_data() Columns("A:A").Select Selection.Insert Shift:=xlToRight...
  12. F

    Macro to insert excel function in cell

    Hey there, I would like my macro to insert a function into a cell. The function works in Excel but if I use the function in my macro it gives an error. Any idea how to write it correctly? Sub Prepare_data() Columns("A:A").Select Selection.Insert Shift:=xlToRight...
  13. W

    Insert formula into cells with variable range

    Hi All, Thanks again for your excecllent help in the past. I have a data export function that finds a dynamic range, copies the values and inserts into a new worksheet. This part is working well. What I need it to do next is to insert two columns before the imported data and add a simple...
  14. N

    Insert/Delete rows when a cell is filled/blank

    Hi, I am a VBA beginner and very new to this website. I want to thank you in advance! Thanks. :smile: Trying to create a friendly main worksheet for individuals when they open up the document. Description with snapshots of my worksheet: I have a list of names in the A column in...
  15. K

    Can't get this line past debugger!

    This works fine: ActiveCell.FormulaR1C1 = "=((R13C/100)*(RC[-1]/1000))" But trying to change to this: ActiveCell.FormulaR1C1 = "=IF(ISBLANK(RC[-1]),"""",((R13C/100)*(RC[-1]/1000))" Stops the debugger. Suggestions?

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