Linked Questions

386 votes
13 answers
687k views

How can I construct the following string in an Excel formula: Maurice "The Rocket" Richard If I'm using single quotes, it's trivial: ="Maurice 'The Rocket' Richard" but what ...
Allain Lalonde's user avatar
20 votes
3 answers
109k views

I tried putting the following code into a program yesterday. VBA called an error. I assume it is because of the double quotes inside the formula. I googled and all results I found just gave the ...
GeoffDS's user avatar
  • 1,281
10 votes
5 answers
147k views

I am attempting to write some VBA which will add header text to 3 cells then fill a formula all the way down to the last row. I have written the below, which writes the headers no problems, but when ...
BellHopByDayAmetuerCoderByNigh's user avatar
4 votes
1 answer
35k views

Sub FillNames() Range("D2:D56").SpecialCells(xlCellTypeBlanks).Formula = _ "=IF(AND(C>800,C<900), "YES", "NO")" End Sub I get the compile error expected: end of statement. It seems to ...
PA_Commons's user avatar
0 votes
2 answers
5k views

I am trying to paste a formula in Excel cell via VBA but with no luck. When i try this code it perfectly works - ActiveSheet.Range("B7").Value = "=VLOOKUP(A7,$A$1:$B$3,2,0)" But when i try this code ...
Ankush Surana's user avatar
1 vote
3 answers
2k views

I'm creating a function that inputs a formula into a cell. But I keep on receiving a syntax error. I know this is due to the quotation marks. I was wondering how I would go about including the ...
user3783607's user avatar
-1 votes
2 answers
2k views

I have a VBA Code that creates a pivot table and then finds the average based on the dynamic range (as the size of the pivot table is always changing) I would like to use AVERAGEIF function instead ...
ClaireLandis's user avatar
1 vote
1 answer
2k views

I have a situation here. There is a excel sheet in which lets say cell A1 as following formula. =(IF(ISERROR(VALUE(SUBSTITUTE(OFFSET(B10,-1,0,1,1),".",""))),1,IF(ISERROR(FIND("`",SUBSTITUTE(OFFSET(...
Ravi Kant Agarwal's user avatar
-1 votes
1 answer
711 views

Hi there I am trying to use " as a character in my code, but VBA always auto corrects it as excess characters (like if I try """). I tried to use the Char(34) character code but it still doesn't work. ...
Rhyfelwr's user avatar
  • 329
2 votes
2 answers
1k views

I've got the following code Sub reset_formulas() uptime_formula = "=IFS(AND(C25="Deployed",C26="Returned"), B26-B25, AND(C25="Returned",C26="Deployed"), 0,...
Sam's user avatar
  • 746
0 votes
1 answer
2k views

I'm simply trying to find the right syntax to pass the following command to cmd. net use P: "\\s0501svm1\home\John Smith" If I type the below then it doesn't work, presumably because the double ...
Phil T's user avatar
  • 87
0 votes
2 answers
358 views

I am adding a button in my excel sheet for adding an employee with above used formulas. First two formulas in the below code work perfect but last one giving syntax error. My code is : Private ...
Pratyush Kumar's user avatar
0 votes
2 answers
880 views

I am trying to put the formula in a range using the code below, but it is throwing error. Can someone help? shtRpt. Range("rng"). FormulaR1C1 = " =OFFSET(INDIRECT(" Sheet1! A1"), Match(RC[30],...
Divya Roopam's user avatar
0 votes
0 answers
638 views

I am needing to replace a single quote with nothing, using VBA. I put together this syntax, but it is reading my single quote as a comment indicator. I also tried to put two single quotes but that ...
IcyPopTarts's user avatar
1 vote
2 answers
402 views

Goodmorning everyone, I'm a beginner with VBA trying out various things. Atm I'm trying to get a formula to be placed inside a row of cells but I'm encountering a problem. I use a number of variables ...
Yvalson Dronkers's user avatar

15 30 50 per page
1
2 3 4 5
8