syntax error

  1. T

    Creating an Excel Rolling Chart

    I´m having trouble creating a rolling chart regarding the syntax of the OFFSET Function for specifying a dynamic range. i want to make the table so that. when a new column header is added, the same values of previous collumns are added bellow this new collumn header aswell. I´m doing this by...
  2. S

    Linking to a workbook that doesn't yet exist - for use in template creating

    Hi all, I am trying to link separate workbooks-not-worksheets that are yet to be created - these would be workbooks created in the future using templates, and the destination workbook I am working in will be a master template as well. This is for a project for study and I have really hit a...
  3. U

    VBA: IF value greater than and less than

    Hello Gurus, I'm getting a syntax error on this part of my code. Anyone who can help me tweak the code below? = = = = Sub Check With Range("Z2") .Formula = "=IF(Z2<0,"Less",IF(Z2>0,"Add",IF(Z2=0,"Zero")))" With .Resize(Range("A" & Rows.Count).End(xlUp).Row - 1)...
  4. R

    Syntax Error after update

    I just updated one of the two computers I use and my daily use macro now has a SYNTAX ERROR. It works fine on the computer that has not been updated. Here is the complete Macro it highlights the following as the error .Type("$A$1:$AC$37613"). Index := 25, Item := Array("canceled","closed"...
  5. H

    Formula Syntax Not Correct

    hi I am trying to have a cell calculate the profit or loss of 2 cells based on a Dutching calculation. Dutching basically just means that if either of the 2 selections has W in row V, the profit is the same regardless of which one has the win. If there is a W in either cell, then the following...
  6. D

    VBA code, subtracting a value from a non 0 range value

    Hello All, I'm new (as in just the last couple of days) to programming in general let alone VBA, but I'm learning. This site has helped me tremendously on a number of code snippets I've been struggling to get right. Anyway, I'm making my next years time sheet for work as I do every year to...
  7. M

    Import CSVs Macro Error Troubleshooting. Please Help a Newbie Out!!

    Hi all! I'm super new to macros/vba and am working on a project for work that requires me to import csvs from a folder into a specific workbook. Each csv will need to go into a new sheet of this same workbook. I read around on the site to get the code I need to pull this off, but for some...
  8. S

    Syntax error

    Hi, When copy the following direct into excel i dont get any errors, works perfectly but if i put it into a module and run it, i get syntax error... =average(INDIRECT($A2&"!a:a"))*SUM(INDIRECT($A2&"!B:B"))+1 But VBA it doesnt not allow me, what am i doing wrong? Range("E2").Formula =...
  9. N

    VBA InStr() Function Nested Or/And Issue

    I can't seem to get the syntax right on my nested OR/ANDs section so I keep getting an error - please help! I'm sure there is a better way to do this than having all the InStr() OR InStr() but I'm not comfortable in VBA at all so I dont' know very much <code style="margin: 0px; padding: 0px...
  10. V

    Help with SQL code within Excel

    Hi guys, I hope you can help me with the SQL query below that I am running in Excel via the Data->Connection, error: Syntax error in FROM clause. Long story short, I used to do a data dump from our database into MS Access and then run the SQL code below from within Excel. It still works nicely...
  11. C

    Help with Marco

    Hi, I want my macro to populate column 'N30:N30000' with my formula. However, for some reason it won't compile the macro due to ' Syntax error'. Any ideas how to resolve this: Sub FillDown() Dim strFormulas(1) As Variant With ThisWorkbook.Sheets("Sheet1") strFormulas(1) =...
  12. D

    Run-time error: '1004': The syntax of this name isn't correct

    Hello all. I've been banging my head against the wall on this one and I finally threw my hands into the air. I definitely need more brain power than I obviously have going on now. My VBA code Creates a new worksheet, names it via an Inputbox function and "supposed" to create three new named...
  13. S

    Having Subquery Trouble

    I have the following query: <tbody> Item No Item Class Dept Code Quantity 0001 Raw Material 1 50 0001 Raw Material 2 30 0002 Raw Material 3 100 0003 Raw Material 1 75 0003 Raw Material 2 100 0003 Raw Material 3 20 0004 WIP Item 4 100 0005 WIP Item 4 100 0005 WIP Item 5 175...
  14. V

    Simple conditional output failure aka Prediction Interval Testing - should be an easy VBA fix

    I do a lot of forecasting and am tired of having to repeatedly write a formula from scratch to test whether or not my forecasts fall within the prediction interval. To be clear what I mean, is that I may predict a value of 1,000 with an 80% chance it will be within 900 and 1100. I need to test...
  15. A

    Excel VBA Compile Time/ Syntax Error with a long formula

    Hello, I am trying to use a macro to remove middle initial (if it exists) from a list of names in column B. This formula is to be typed into cell D2. My formula works when I type it into excel, but not when I record it as a macro and run it. There is a compile time/syntax error. The code is...
  16. D

    SQL Statement giving "Syntax error insert into statement"

    First, I want to make everyone aware that I'm new to VBA, SQL, AND Access. Our data guy let suddenly so I've been given the job of maintaining my organizations databases even though my background is in Educational research. :eeek: So I'm sorry if I give too much/not enough information and if my...
  17. 0

    Compile Error: Syntax error

    Macro that generates emails with for a number of different people with predefined text. Error when trying to run. 'EMAIL TEXT With OutMail strbody = "Good " & g01 & " " & Range("C" & ActiveCell.Row).Value & "," & vbNewLine & vbNewLine & _ "<br/>" & _ vbNewLine...
  18. J

    Syntax Error - Insert Column Header (Good), Insert Formula in Row 2 (Good), Drag to Last Row (ERROR)

    Hello, any ideas how I can get the following code to work? I am adding a column called "Value less VAT", then adding in the formula in row 2, then attempting to drag it down to the last row. Everything works like a charm, except the dragging down portion. See details below. Code #1 = my code...
  19. M

    Long formula "Compile error: Syntax error"

    Hi There, I am applying a formula in excel and it is working fine. I am recording the macro with the formula and I am getting Syntax error. The formula is "=IF(RIGHT(TRIM(LEFT(F2,IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(FIND(".",F2,1),FIND("...
  20. D

    Hopefully Simple Question with a Simple Explanation...PLEASE HELP!

    Hi, I'm trying to nest an OR statement within an IF statement, with varying luck. ----------- The following example works: =IF(OR(H2="Apple",H2="ApplComputer",H2="APPLE CANADA DIV",H2="IPHONE",H2="MACBOOK"),"Apple”,"Other") While the below example does not and instead returns a #NAME? error...

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