Giter Site home page Giter Site logo

ifgenerator's Introduction

ifGenerator

PowerShell utility to create horrible, horrible =IF() statement chains for Sharepoint List Derived Columns, or Excel.

Splits output into groups of 4+remainder to allow as deep as an IF statement chain as needed.

Usage:
Read the IMPORTANT heading below -- you must modify the $ifType variable in the code for your needs.

Example output:

=IF((A1=11),"item11Name",  
IF((A1=10),"item10Name",  
IF((A1=9),"item9Name",  
IF((A1=8),"item8Name",  
("")))))  
&  
IF((A1=7),"item7Name",  
IF((A1=6),"item6Name",  
IF((A1=5),"item5Name",  
IF((A1=4),"item4Name",  
("")))))  
&  
IF((A1=3),"item3Name",  
IF((A1=2),"item2Name",  
IF((A1=1),"item1Name",  
(""))))  

IMPORTANT

** This information appears in the ifGenerator.ps1 code as well **

In the code, leave only one of the $ifType variables (lines) uncommented. Excel and Sharepoint derived columns use different formats. In addition, the specific cell or column name needs to be changed inside the $ifType variable string.

For Excel

Replace A1 in the $ifType string with the Excel cell in question:

*** Comment out this line if creating a Sharepoint =IF()

$ifType = "IF((A1=" # Uncomment this line for Excel. 

For Sharepoint

Replace item# in the string below with the Sharepoint derived column name in question:

*** Comment out this line if creating an Excel =IF()

$ifType = "IF(([item#]=" # Uncomment this line for Sharepoint. 

ifgenerator's People

Contributors

ericdorsey avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.