Solved

Excel add other variable to if statement

Posted on 2014-09-11
2
117 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

752 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