Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default VBA IIf(myCell.Value = Array(myCell2(1).Value, myCell2(2).Value,myCell2(3).Value,myCell2(4).Value ) ,"OK","No Match)

2003, 2007


Have a routine where I would like to ascertain if myCell,value = an array of myCell2 cells.

What I conceive the formula to be is:
VBA Message = IIf(myCell.Value = Array(myCell2(1).Value,
myCell2(2).Value,myCell2(3).Value,myCell2(4).Value ) ,"OK","No Match)

Another way to phrase my question.

1) I have an array of myCell2 Formulas on Secondary W/S
2) Also I have an array of myCell Formulas Secondary W/S
3) TempFormula is a string representing the formula on the Master Worksheet
4) If myCell.formula matches any of the myCell2.Formula(s) then I want to:
5) Replace(TempFormula, myCell2.value,"")
6) How can I write an array(?) formula to have all of the array values
available for the replace test?

TIA EagleOne
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default VBA IIf(myCell.Value = Array(myCell2(1).Value, myCell2(2).Value,myCell2(3).Value,myCell2(4).Value ) ,"OK","No Match)

How is myCell2 Dim'med and how did you assign values to it?

--
Rick (MVP - Excel)


wrote in message
...
2003, 2007


Have a routine where I would like to ascertain if myCell,value = an array
of myCell2 cells.

What I conceive the formula to be is:
VBA Message = IIf(myCell.Value = Array(myCell2(1).Value,
myCell2(2).Value,myCell2(3).Value,myCell2(4).Value ) ,"OK","No Match)

Another way to phrase my question.

1) I have an array of myCell2 Formulas on Secondary W/S
2) Also I have an array of myCell Formulas Secondary W/S
3) TempFormula is a string representing the formula on the Master
Worksheet
4) If myCell.formula matches any of the myCell2.Formula(s) then I want to:
5) Replace(TempFormula, myCell2.value,"")
6) How can I write an array(?) formula to have all of the array values
available for the replace test?

TIA EagleOne


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default VBA IIf(myCell.Value = Array(myCell2(1).Value, myCell2(2).Value,myCell2(3).Value,myCell2(4).Value ) ,"OK","No Match)

Hi Rick,

MyCell, MyCell2, MyRange & Myrange2 are all Dim'd As Range

EagleOne

"Rick Rothstein" wrote:

How is myCell2 Dim'med and how did you assign values to it?

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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Custom Data Validation : Lock if MyCell = ""? RayportingMonkey Excel Worksheet Functions 5 October 25th 07 03:14 PM
Listbox header inside VBA (Array("Head1", "Head2", ...) Alex St-Pierre Excel Programming 2 October 25th 06 09:28 PM
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... Maria J-son[_2_] Excel Programming 2 March 5th 06 12:20 PM
Application.Goto reference:="MyCell" akyhne[_2_] Excel Programming 1 August 16th 05 12:30 PM


All times are GMT +1. The time now is 03:59 PM.

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

About Us

"It's about Microsoft Excel"