Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default question to Ron

Ron,
How could I assign your wonderful formula you advised before
[=OR(A2={"ERP","PM","HPW","OJT","SBR"","LD","CFT"})] to the FormulaR1C1?
I'm trying different ways but nothing is working.
'A = Array("ERP", "PM", "HPW", "OJT", "SBR", "LD", "CFT")
strERP = "ERP"
strPM = "PM"
strHPW = "HPW"
strOJT = "OJT"
strSBR = "SBR"
strLD = "LD"
strCFT = "CFT"
.FormulaR1C1 =
"=OR(RC[-11]={strERP,strPM,strHPW,strOJT,strSBR,strLD,strCFT}) " '
"=OR(RC[-11]=A)"

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default question to Ron

Thanks, I've managed with it.
With Target(1, 12)
If Target.Value < "" Then
varTV = Target.Value
If varTV = "ERP" Or varTV = "PM" Or varTV = "HPW" Or varTV = "OJT" _
Or varTV = "SBR" Or varTV = "LD" Or varTV = "CFT" Then
.FormulaR1C1 = "=True"
Else
.FormulaR1C1 = "=False"
End If

Else
.ClearContents
End If
End With

"Alex" wrote:

Ron,
How could I assign your wonderful formula you advised before
[=OR(A2={"ERP","PM","HPW","OJT","SBR"","LD","CFT"})] to the FormulaR1C1?
I'm trying different ways but nothing is working.
'A = Array("ERP", "PM", "HPW", "OJT", "SBR", "LD", "CFT")
strERP = "ERP"
strPM = "PM"
strHPW = "HPW"
strOJT = "OJT"
strSBR = "SBR"
strLD = "LD"
strCFT = "CFT"
.FormulaR1C1 =
"=OR(RC[-11]={strERP,strPM,strHPW,strOJT,strSBR,strLD,strCFT}) " '
"=OR(RC[-11]=A)"

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default question to Ron

The sad think is that it makes no difference what you setting is in the
spread sheet. you can use either in VBA

ActiveCell.Formula = "=OR(A2 . .

or

ActveCell.FormulaR1C1 = "=OR(R[-10]C . . .



VBA/Excel interprets it and puts the correct information in the cell.

from the immediate window as a demo:

ActiveCell.FormulaR1C1 = "=R[-10]C"
? activecell.Formula
=A2
? activeCell.FormulaR1C1
=R[-10]C
? activeCell.Address
$A$12

--
Regards,
Tom Ogilvy

"Alex" wrote in message
...
Thanks, I've managed with it.
With Target(1, 12)
If Target.Value < "" Then
varTV = Target.Value
If varTV = "ERP" Or varTV = "PM" Or varTV = "HPW" Or varTV = "OJT"

_
Or varTV = "SBR" Or varTV = "LD" Or varTV = "CFT" Then
.FormulaR1C1 = "=True"
Else
.FormulaR1C1 = "=False"
End If

Else
.ClearContents
End If
End With

"Alex" wrote:

Ron,
How could I assign your wonderful formula you advised before
[=OR(A2={"ERP","PM","HPW","OJT","SBR"","LD","CFT"})] to the FormulaR1C1?
I'm trying different ways but nothing is working.
'A = Array("ERP", "PM", "HPW", "OJT", "SBR", "LD", "CFT")
strERP = "ERP"
strPM = "PM"
strHPW = "HPW"
strOJT = "OJT"
strSBR = "SBR"
strLD = "LD"
strCFT = "CFT"
.FormulaR1C1 =
"=OR(RC[-11]={strERP,strPM,strHPW,strOJT,strSBR,strLD,strCFT}) " '
"=OR(RC[-11]=A)"

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default question to Ron

Thank you, Tom.

"Tom Ogilvy" wrote:

The sad think is that it makes no difference what you setting is in the
spread sheet. you can use either in VBA

ActiveCell.Formula = "=OR(A2 . .

or

ActveCell.FormulaR1C1 = "=OR(R[-10]C . . .



VBA/Excel interprets it and puts the correct information in the cell.

from the immediate window as a demo:

ActiveCell.FormulaR1C1 = "=R[-10]C"
? activecell.Formula
=A2
? activeCell.FormulaR1C1
=R[-10]C
? activeCell.Address
$A$12

--
Regards,
Tom Ogilvy

"Alex" wrote in message
...
Thanks, I've managed with it.
With Target(1, 12)
If Target.Value < "" Then
varTV = Target.Value
If varTV = "ERP" Or varTV = "PM" Or varTV = "HPW" Or varTV = "OJT"

_
Or varTV = "SBR" Or varTV = "LD" Or varTV = "CFT" Then
.FormulaR1C1 = "=True"
Else
.FormulaR1C1 = "=False"
End If

Else
.ClearContents
End If
End With

"Alex" wrote:

Ron,
How could I assign your wonderful formula you advised before
[=OR(A2={"ERP","PM","HPW","OJT","SBR"","LD","CFT"})] to the FormulaR1C1?
I'm trying different ways but nothing is working.
'A = Array("ERP", "PM", "HPW", "OJT", "SBR", "LD", "CFT")
strERP = "ERP"
strPM = "PM"
strHPW = "HPW"
strOJT = "OJT"
strSBR = "SBR"
strLD = "LD"
strCFT = "CFT"
.FormulaR1C1 =
"=OR(RC[-11]={strERP,strPM,strHPW,strOJT,strSBR,strLD,strCFT}) " '
"=OR(RC[-11]=A)"

Thanks




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good davegb Excel Programming 1 May 6th 05 06:35 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 27th 05 07:46 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 23 April 23rd 05 09:26 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 22nd 05 03:30 PM


All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"