Solved

Excel add other variable to if statement

Posted on 2014-09-11
2
112 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 49

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40316411
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_
ID: 40316467
perfect as usual. Thank you so much
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to add the word OR to the front of each Excel value 4 37
increment numbers by 10 11 31
Excel macro runs twice 13 52
Pivot help - Display only Is Not Null 7 17
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;…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

863 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

27 Experts available now in Live!

Get 1:1 Help Now