Solved

Excel add other variable to if statement

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Make a Cell act like a Date 7 39
Msbbox Notice (4 days) 27 59
Select/Copy row and pasting it lower in sheet 7 20
Rather Simple Formatting Question 6 24
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…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 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