Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change a number within formulas? 4

Status
Not open for further replies.

jatolo

MIS
Jul 17, 2006
40
US
Hi....
I have this formula in about 100 cells,
=IF(OR(AND(C7=$C$4,D7=$D$4)),1,0,) I just need to replace the NUMBER 1 FOR NUMBER 2...
Do I have to replace every single cell one by one? or Is there any way to do everyones at once?
Thanks for your help...
 



Hi,

Copy your cell containing the formula.

Select the range you want the formula in.

Edit > Paste.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Select the relevant cells then do menu command Edit/Replace:
From: ",1,"
To: ",2,"
Replace All

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
If this is something that might change again in the future, you could use a cell reference instead.

You'd still use Find and Replace (shortcut for which is [Ctrl]+[H]) as Glenn and elsenorjose suggested - just replace with something like ",$A$1," instead. Then put 1 or 2 or whatever else it might change to in A1.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
One of And\Or is surely surplus to requirements in that formula?
 
Well spotted, RivetHed - I didn't even look at the formula long enough to realize that the OR is not doing anything.

jatolo: this does the same thing without the extraneous OR:
[tab]=IF(AND(C7=$C$4,D7=$D$4),1,0,)

The syntax for OR is [COLOR=blue white]OR(Condition1,Condition2)[/color]. You provided an AND function for the first condition, but there is no second condition listed.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top