syntax

  1. S

    Adding Items to a Collection

    Greetings, I would like to add a range of columns to a collection and then use the collection in a for each loop including each column-element in the collection in a procedure. like, Dim i As String For Each i in col Is there a more convenient syntax than something like col.add F I would...
  2. G

    IF AND Syntax

    Good Afternoon, I have a project that requires a grading score based on several criteria. I have to return a "A", "B", "C" or "D" if certain conditions are met. I have no idea what the syntax should be? There are 3 criteria's and 4 grades that can be applied. Criteria 1...
  3. 2

    Combining two subroutines

    My goal is to use the range objects from subroutine A toexecute subroutine B. To do this, I’d like to combine subroutine B intosubroutine A. I was going to attach the spreadsheet to show you what I mean, but I don't have permissions to do that. Basically, if you could help me on my syntax (I...
  4. T

    syntax error

    What is the syntax error in the following line. I want to merge two cells into one and maintain the the format of the percentage. ActiveCell.FormulaR1C1 = "=Rc[-3]&"",""&text(Rc[-4],0%)&"","" Thanks
  5. N

    VBA Syntax

    Range("E2, G2").Select (This is what I want to do, but without specific cell addresses) Range (ActiveCell), Range(ActiveCell).Offset(0, 3).Select What syntax can I use to do this? (hope this makes sense!)
  6. N

    VBA syntax help

    Range("D3").Name = "ChkPart" Range("ChkPart", Range("ChkPart").Offset.End(xlToRight)).Select The code above I can use to select from “ChkPart” (or cell D3) through the cells with data to the right. What I would like to do is select the cells to the right beginning from E3. I know the...
  7. M

    CUBEVALUE MDX to exclude blanks?

    I have a CUBEVALUE function that works fine for providing a total cost measure for items shipped from a warehouse (Phoenix in the sample below) in a dashboard. Simplified version is: =CUBEVALUE("ThisWorkbookDataModel","[Daily].[Warehouse].[Phoenix]","[Measures].[Total Cost]") However I would...
  8. J

    Syntax Error for formula

    Hi , I am recording my macro to input a formula , it is amending the original formula to the below but when I try and run it , it creates a syntax error. Anyone any ideas what is causing this issue. Thanks, ActiveCell.FormulaR1C1 = _...
  9. G

    Syntax inside a class module to call a built-in function

    Hi! I'm working on a class for managing two dates. Right now I need a very simple WeekDay function, with the following syntax: oMyObject.WeekDay(dDate As Date) As Long The method looks, not very surprisingly, like this: Private Function WeekDay(dDate As Date) WeekDay = WeekDay(dDate...
  10. Jym396

    VBA Syntax

    I'm tryin' here...just can't get it... Using this formula in the worksheet: =IF(INDEX(B388:B404,MATCH(TODAY(),C388:C404,0))<>"","N","Y") And it works just fine. Just can't seem to get the VBA syntax right. Do I need to use the...
  11. S

    Syntax Error (missing operator) in query expression

    Hello, First, I am no expert (otherwise I wouldn't be here right?), but I am attempting to create a pivot table using several worksheets in a book and after inputting: SELECT * QA-Total union all SELECT * QA-IT union all SELECT * QA-Protocol union all SELECT * QA-Technical into...
  12. M

    Find last cell in a range

    At the moment I'm using the following to find the last cell but obviously it only searches the A column is there a way I can amend it to search more than one column say to AH, I imagine it's probably some simple syntax but I haven't been able to find it yet. Thanks Dim LrowRunners As Long...
  13. S

    Convert Countifs to Sumproduct

    I have a formula in the destination workbook using countifs, it works well .... as long as the source workbook is open, otherwise it fails. I know that countifs doesn't work across closed workbooks. So I want to convert it to sumproduct, which I know works across closed workbooks. I am having...
  14. N

    Require Correct Syntax using .Formula = "=Substitiute...." between two sheets

    Hi Can anyone help me with correct syntax for the following ActiveSheet.Range("B1").Formula = "=SUBSTITUTE(A1,TRIM(RIGHT(SUBSTITUTE(A1,""."",REPT("" "",255)),255)),TRIM(RIGHT(SUBSTITUTE(A1,""."",REPT("" "",255)),255))+1)" Instead of using ActiveSheet. Range would like to use Sheet1 and...
  15. N

    Cell A equal to Cell B Reference?

    I'm sure i have done this before but i have forgot the Syntax. I Want Cell A1 to be equal to the content of Cell B1. Not just the current "Value" but an actual reference. Range("A1").Value="=B1" I need to use it in a loop so the syntax has to be somewhat more clever than the above Currently...
  16. H

    show syntax for function as in-built function

    Hello Excellers, What is the code for showing syntax while entering a custom made function in excel like in-built excel functions? Regards, Safal
  17. N

    Missing date formula syntax

    If A2 has a date like 11/30/16, and E2 has 03/31/17, then a formula: =A2>E2 returns false. But, if if I type =A2>03/31/17, it returns 'True', which is not correct. I had the same issue using a date within a conditional formatting formula. Isn't there a syntax to use besides using the =Date()...
  18. P

    Syntax

    I'm having problems with the syntax of a function. I want to count the number of time a number comes up, my formula would be; =COUNTIF(A1:A50,A1<>A2). It's the A1<>A2 that I can't get to plug in correctly. What would the SUMPRODUCT function look like to do the same thing? Thanks
  19. T

    Sum with Sheet names as a variable instead of manually provided text

    Since I've been hacking away at this syntax for over an hour... I figured it was time to give up and ask people smarter than me. I want to take the following standard SUM syntax: =SUM('Sheet3'!C5:C100) And, instead of manually specifying "Sheet3" in the formula I want to include a variable of...
  20. M

    Syntax to refer to a range within an array

    I'm doing some things with arrays but stuck on the syntax using the format array(i, 4) can anyone tell me how I would refer to the range array(i,1) to array(i,5) , I'm just trying to set the values to nothing within that range but unsure of the syntax and don't want to set each one separately if...

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