Mandy_
asked on
Excel / Powershell If statement with 3 variables
Dear experts,
could anybody help me with this formula below?
If GAL = -CustomAttribute4 'T' -CustomAttribute8 'LS' -CustomAttribute10 'LS' -CustomAttribute14 'HAD'
and SMTP = '"&I2&"','"&J2&"','"&K2&"' ,'SMTP:"&F 2&"','smtp :"&G2&"',' smtp:"&H2&
if GUL = -CustomAttribute4 'T' -CustomAttribute10 'LTS' -CustomAttribute14 'HAD'
and SMTP = '"&I2&"','"&J2&"','"&K2&"' ,'SMTP:"&F 2&"','smtp :"&G2&"
all other not GUL or GAL = -CustomAttribute4 '"&P2&" -CustomAttribute10 'LT' -CustomAttribute14 'HAD'
and SMTP = '"&I2&"','"&J2&"','"&K2&"' ,'SMTP:"&F 2&"','smtp :"&G2&" (same as "GUL")
I tried this behind but failed ;) Thanks in advance!
="Start-Sleep -s 10;Set-Mailbox "&IF(ISERROR(SEARCH("GAL", L2)),IF(IS ERROR(SEAR CH("GUL",L 2)),&" -CustomAttribute4 'T' -CustomAttribute8 'LS' -CustomAttribute10 'LS' -CustomAttribute14 'HAD' -EmailAddressPolicyEnabled $false -SingleItemRecoveryEnabled $true -EmailAddresses '"&I2&"','"&J2&"','"&K2&"' ,'SMTP:"&F 2&"','smtp :"&G2&"',' smtp:"&H2& "' -Identity "&A2&"",A2&" -CustomAttribute4 'T' -CustomAttribute10 'LTS' -CustomAttribute14 'HAD' -EmailAddressPolicyEnabled $false -SingleItemRecoveryEnabled $true -EmailAddresses '"&I2&"','"&J2&"','"&K2&"' ,'SMTP:"&F 2&"','smtp :"&G2&"'-I dentity "&A2&"))"
could anybody help me with this formula below?
If GAL = -CustomAttribute4 'T' -CustomAttribute8 'LS' -CustomAttribute10 'LS' -CustomAttribute14 'HAD'
and SMTP = '"&I2&"','"&J2&"','"&K2&"'
if GUL = -CustomAttribute4 'T' -CustomAttribute10 'LTS' -CustomAttribute14 'HAD'
and SMTP = '"&I2&"','"&J2&"','"&K2&"'
all other not GUL or GAL = -CustomAttribute4 '"&P2&" -CustomAttribute10 'LT' -CustomAttribute14 'HAD'
and SMTP = '"&I2&"','"&J2&"','"&K2&"'
I tried this behind but failed ;) Thanks in advance!
="Start-Sleep -s 10;Set-Mailbox "&IF(ISERROR(SEARCH("GAL",
="Start-Sleep -s 10;Set-Mailbox "&IF(ISERROR(SEARCH("GAL",L2)),IF(ISERROR(SEARCH("GUL",L2)),&" -CustomAttribute4 'T' -CustomAttribute8 'LS' -CustomAttribute10 'LS' -CustomAttribute14 'HAD' -EmailAddressPolicyEnabled $false -SingleItemRecoveryEnabled $true -EmailAddresses '"&I2&"','"&J2&"','"&K2&"','SMTP:"&F2&"','smtp:"&G2&"','smtp:"&H2&"' -Identity "&A2&"",A2&" -CustomAttribute4 'T' -CustomAttribute10 'LTS' -CustomAttribute14 'HAD' -EmailAddressPolicyEnabled $false -SingleItemRecoveryEnabled $true -EmailAddresses '"&I2&"','"&J2&"','"&K2&"','SMTP:"&F2&"','smtp:"&G2&"'-Identity "&A2&"))"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER