Solved

Excel add other variable to if statement

Posted on 2014-09-11
2
111 Views
Last Modified: 2014-09-11
Dear experts,

Could anybody assist with this:

Add other variabe
=IF(ISERROR(SEARCH("GIL",P14))*1=1,"enable-mailbox -identity "&A14&" -Alias "&A14,"enable-mailbox -identity "&A14&" -Alias "&A14&" -database DBGIL"&TEXT(INT(RAND()*42)+1,"000"))

Should change to
if "GIL" then "enable-mailbox -identity "&A14&" -Alias "&A14&" -database DBGIL"&TEXT(GANZZAHL(ZUFALLSZAHL()*42)+1,"000"))
iF "GAL" then "enable-mailbox -identity "&B2&" -Alias "&B2&" -database DBGAL"&TEXT(GANZZAHL(ZUFALLSZAHL()*30)+1,"00")
all other ,"enable-mailbox -identity "&A14&" -Alias "&A14
0
Comment
Question by:Mandy_
2 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
pls try

="enable-mailbox -identity "&IF(ISERROR(SEARCH("GIL",P14)),IF(ISERROR(SEARCH("GAL",P14)),A14&" -Alias "&A14,B2&" -Alias "&B2&" -database DBGAL"&TEXT(INT(RAND()*30)+1,"00")),A14&" -Alias "&A14&" -database DBGIL"&TEXT(INT(RAND()*42)+1,"000"))
0
 
LVL 2

Author Closing Comment

by:Mandy_
Comment Utility
perfect as usual. Thank you so much
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now