ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula Not Working-Help Please!!! (https://www.excelbanter.com/excel-programming/365272-formula-not-working-help-please.html)

Paige

Formula Not Working-Help Please!!!
 
Can someone tell me what is wrong with this code? I get an
application/object defined error on the 2nd row. Am trying to insert a sumif
formula into a cell, to add only those cells that do NOT have the word "MES"
in them.

Cells(Cells.Rows.Count, "T").End(xlUp).Offset(-1, 0).Select
Selection.Formula = "=SUMIF(I12:I50030,< ""MES"",T12:T50030)"

Thanks.....

Ardus Petus

Formula Not Working-Help Please!!!
 
Selection.Formula = "=SUMIF(I12:I50030,""<MES"",T12:T50030)"

HTH
--
AP


"Paige" a écrit dans le message de news:
...
Can someone tell me what is wrong with this code? I get an
application/object defined error on the 2nd row. Am trying to insert a
sumif
formula into a cell, to add only those cells that do NOT have the word
"MES"
in them.

Cells(Cells.Rows.Count, "T").End(xlUp).Offset(-1, 0).Select
Selection.Formula = "=SUMIF(I12:I50030,< ""MES"",T12:T50030)"

Thanks.....




Andrew Taylor

Formula Not Working-Help Please!!!
 
You need more quotes around the criterion parameter:

Selection.Formula = "=SUMIF(I12:I50030,""<
""""MES"""""",T12:T50030)"



Paige wrote:
Can someone tell me what is wrong with this code? I get an
application/object defined error on the 2nd row. Am trying to insert a sumif
formula into a cell, to add only those cells that do NOT have the word "MES"
in them.

Cells(Cells.Rows.Count, "T").End(xlUp).Offset(-1, 0).Select
Selection.Formula = "=SUMIF(I12:I50030,< ""MES"",T12:T50030)"

Thanks.....



Paige

Formula Not Working-Help Please!!!
 
Thanks guys!

"Andrew Taylor" wrote:

You need more quotes around the criterion parameter:

Selection.Formula = "=SUMIF(I12:I50030,""<
""""MES"""""",T12:T50030)"



Paige wrote:
Can someone tell me what is wrong with this code? I get an
application/object defined error on the 2nd row. Am trying to insert a sumif
formula into a cell, to add only those cells that do NOT have the word "MES"
in them.

Cells(Cells.Rows.Count, "T").End(xlUp).Offset(-1, 0).Select
Selection.Formula = "=SUMIF(I12:I50030,< ""MES"",T12:T50030)"

Thanks.....




Frankey

Formula Not Working-Help Please!!!
 

Why does this code not work?

Workbooks("TEST").Sheets(1).Cells(10, 11).Formula ="=IF(H" & 10 & "=" &
"""XYZ""" & ";" & "G" & 10 & ";" & "0)"


thx in adv.


--
Frankey
------------------------------------------------------------------------
Frankey's Profile: http://www.excelforum.com/member.php...o&userid=35748
View this thread: http://www.excelforum.com/showthread...hreadid=555228


Ardus Petus

Formula Not Working-Help Please!!!
 
Replace the ; (semicolons) with , (commas)

HTH
--
AP

"Frankey" a écrit
dans le message de news:
...

Why does this code not work?

Workbooks("TEST").Sheets(1).Cells(10, 11).Formula ="=IF(H" & 10 & "=" &
"""XYZ""" & ";" & "G" & 10 & ";" & "0)"


thx in adv.


--
Frankey
------------------------------------------------------------------------
Frankey's Profile:
http://www.excelforum.com/member.php...o&userid=35748
View this thread: http://www.excelforum.com/showthread...hreadid=555228




Frankey[_2_]

Formula Not Working-Help Please!!!
 

Thanks a lot. It works very well. :

--
Franke
-----------------------------------------------------------------------
Frankey's Profile: http://www.excelforum.com/member.php...fo&userid=3574
View this thread: http://www.excelforum.com/showthread.php?threadid=55522



All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com