ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to insert formula to a range of cells from VBA? (https://www.excelbanter.com/excel-programming/325032-how-insert-formula-range-cells-vba.html)

crapit

How to insert formula to a range of cells from VBA?
 
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )





Bob Phillips[_6_]

How to insert formula to a range of cells from VBA?
 
Range("E2:E6").Formula = "=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )







crapit

How to insert formula to a range of cells from VBA?
 
What is a circular reference?
"Bob Phillips" wrote in message
...
Range("E2:E6").Formula = "=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )









Bob Phillips[_6_]

How to insert formula to a range of cells from VBA?
 
It means that the cell formula is referring to itself. Look up 'Formulas
that refer back to their own cells' in the Answer Wizard in help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What is a circular reference?
"Bob Phillips" wrote in message
...
Range("E2:E6").Formula = "=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )











crapit

How to insert formula to a range of cells from VBA?
 
What abt to a cell only? I seem to get error with the true or false value
enclose in bracket!
"Bob Phillips" wrote in message
...
It means that the cell formula is referring to itself. Look up 'Formulas
that refer back to their own cells' in the Answer Wizard in help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What is a circular reference?
"Bob Phillips" wrote in message
...
Range("E2:E6").Formula = "=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )













Bob Phillips[_6_]

How to insert formula to a range of cells from VBA?
 
Ugh? Do you want to explain that?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What abt to a cell only? I seem to get error with the true or false value
enclose in bracket!
"Bob Phillips" wrote in message
...
It means that the cell formula is referring to itself. Look up 'Formulas
that refer back to their own cells' in the Answer Wizard in help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What is a circular reference?
"Bob Phillips" wrote in message
...
Range("E2:E6").Formula =

"=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )















crapit

How to insert formula to a range of cells from VBA?
 
I.e In a If loop, IF(logical_test,value_if_true,value_if_false).
"Bob Phillips" wrote in message
...
Ugh? Do you want to explain that?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What abt to a cell only? I seem to get error with the true or false value
enclose in bracket!
"Bob Phillips" wrote in message
...
It means that the cell formula is referring to itself. Look up
'Formulas
that refer back to their own cells' in the Answer Wizard in help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What is a circular reference?
"Bob Phillips" wrote in message
...
Range("E2:E6").Formula =

"=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )

















Bob Phillips[_6_]

How to insert formula to a range of cells from VBA?
 
Do you mean

=IF(logical_test,"value",IF(another_Test,"value2", "value3"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
I.e In a If loop, IF(logical_test,value_if_true,value_if_false).
"Bob Phillips" wrote in message
...
Ugh? Do you want to explain that?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What abt to a cell only? I seem to get error with the true or false

value
enclose in bracket!
"Bob Phillips" wrote in message
...
It means that the cell formula is referring to itself. Look up
'Formulas
that refer back to their own cells' in the Answer Wizard in help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What is a circular reference?
"Bob Phillips" wrote in message
...
Range("E2:E6").Formula =

"=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told

before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )



















crapit

How to insert formula to a range of cells from VBA?
 
Yes, However, If the value is numeric (w/o the ""), there will be no error!
If the original formula is manually insert at the cell, there is no error!

"Bob Phillips" wrote in message
...
Do you mean

=IF(logical_test,"value",IF(another_Test,"value2", "value3"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
I.e In a If loop, IF(logical_test,value_if_true,value_if_false).
"Bob Phillips" wrote in message
...
Ugh? Do you want to explain that?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What abt to a cell only? I seem to get error with the true or false

value
enclose in bracket!
"Bob Phillips" wrote in message
...
It means that the cell formula is referring to itself. Look up
'Formulas
that refer back to their own cells' in the Answer Wizard in help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What is a circular reference?
"Bob Phillips" wrote in message
...
Range("E2:E6").Formula =
"=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told

before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )





















crapit

How to insert formula to a range of cells from VBA?
 
No help?
"Bob Phillips" wrote in message
...
Do you mean

=IF(logical_test,"value",IF(another_Test,"value2", "value3"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
I.e In a If loop, IF(logical_test,value_if_true,value_if_false).
"Bob Phillips" wrote in message
...
Ugh? Do you want to explain that?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What abt to a cell only? I seem to get error with the true or false

value
enclose in bracket!
"Bob Phillips" wrote in message
...
It means that the cell formula is referring to itself. Look up
'Formulas
that refer back to their own cells' in the Answer Wizard in help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What is a circular reference?
"Bob Phillips" wrote in message
...
Range("E2:E6").Formula =
"=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told

before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )





















crapit

How to insert formula to a range of cells from VBA?
 
Really no help?
"Bob Phillips" wrote in message
...
Do you mean

=IF(logical_test,"value",IF(another_Test,"value2", "value3"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
I.e In a If loop, IF(logical_test,value_if_true,value_if_false).
"Bob Phillips" wrote in message
...
Ugh? Do you want to explain that?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What abt to a cell only? I seem to get error with the true or false

value
enclose in bracket!
"Bob Phillips" wrote in message
...
It means that the cell formula is referring to itself. Look up
'Formulas
that refer back to their own cells' in the Answer Wizard in help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
What is a circular reference?
"Bob Phillips" wrote in message
...
Range("E2:E6").Formula =
"=IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),""Not
Available"",IF(E2-TODAY()<0,""Expendite"",E2-TODAY()) )"

but you will get a circular reference, as you have been told

before.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"crapit" wrote in message
...
How do i insert the following formula from range e2 to j26?
IF(OR(ISERROR(E2-TODAY()),ISBLANK(E2)),"Not
Available",IF(E2-TODAY()<0,"Expendite",E2-TODAY()) )






















All times are GMT +1. The time now is 03:13 AM.

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