SharePoint Online: Default value: + Calculated Value option Formula - sharepoint-online

In SharePoint Online, I have a list with various columns.
In the list, there is a column name 'Change Type' which has few dropdown menu. One of the option in the dropdown menu in 'Project'
Another column named 'Complexity' also has dropdown menu and one of the option is 'N/A'
In 'Complexity' column I want to use Default value: + Calculated Value. I want the Default Value to be 'N/A' if in 'Change Type' column, someone selects 'Project'.
I have tried this formula and it didn't work and I get Unexpected error message.
=IF([Change Type]=”Project”,”N/A”)
What formula should I use?

In SharePoint online, it's not supported that formula contains reference to other fields when setting column default value. Only caculated column can cotain other columns.
If you are using modern experience, you could use column formatting to achieve this:
https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting

Related

Sharepoint - How can I conditionally show a column OR hide a column based on selected value from another column?

I am having trouble to conditionally format a column to be shown as mandatory/ option or hidden based on value from another column in sharepoint.
For example:
Column 1 = Facebook/ Twitter/ Instagram
Column 2 = Yes/ No
If user selects Facebook for Column 1, show Column 2 as Mandatory.
If user selects Twitter for Column 1, show Column 2 as Optional.
If user selects Instagram for Column 1, hide Column 2.
Using the example above -
I've tried the formula =if([$Column1] == 'Instagram', 'true', 'false'). However, this will show column 2 as optional if selected value for column 1 is Facebook/ Twitter.
I've also tried to configure column 2 as mandatory from column setting. However, once column 2 is mandatory, then I won't be able to insert any condition formula for column 2.
Can you please assist?
Thanks in advance
You cannot make a column Mandatory/Optional using conditional formula in SharePoint.
You can only show or hide columns in a list forms using conditional formula.
Also, if you make a column as required field from column settings, you cannot add conditional formula on it. This is by design
Documentation: Show or hide columns in a list or library form
You can make columns mandatory/optional by customizing the list forms using Power Apps.
For more information, check:
Make a field required based on another field
How do you make a field required?

Dependent Dropdown lists and Offset formulas

I have a sheet with a price list for many items, all of them have a column for category and another column for core product, secondary or third. I then have description, price etc.
I have built an Invoice configurator that when the user selects a category it comes up with an offset formula for product (description) and a bloom up formula then brings up the item code, price etc.
I have an issue where I am trying to get the spreadsheet to allow me to have the following.
1. Dropdown for product type.
2. Dependent Dropdown for category
3. Dependent Dropdown for product type
4. Then the offset formula to look at all 3 Dropdown options and only provide me with those products.
Does anyone have any ideas?
Thank you in advance
You can create dependant dropdown menus with named ranges, data validation and INDIRECT formula. Then use FILTER formula to extract the products corresponding to the 3 selected options. I've made a tiny example :
With blue background, the dropodown menus (2 dependants). On the right, the named ranges. On top, the data. With green background, the output (1 result only since my sample DATA is very small).
EDIT : You want a dropdown menu to select the results (after the user has done his 3 choices). You can use TEXTJOIN to build a list from the results and then create another dropdown menu (dynamically resized). If you want something more "transparent" (no table of results to hide), it's possible to replace the FILTER formula with SUMPRODUCT and MATCH (the TEXTJOIN column will be placed in the original table and might cause slowdowns if the number of items is too big).
Sheet

SharePoint 2010: Calendar list's "All Items" view not allowing a formula in calculated field

I initially made a general custom list in SP 2010 where my formula worked without issue.
Then used same column names and data type in Calendar list's "All Items" view and getting this ERROR:
One or more column references are not allowed, because the columns are
defined as a data type that is not supported in formulas.
Here is the formula:
=IF([EVENT TYPE]="Blue",0,
IF([EVENT TYPE]="Build(nonBlue)",1,
IF([EVENT TYPE]="Pink",2,
IF([EVENT TYPE]="Cutoff",4,
IF([EVENT TYPE]="Today",5,
IF([EVENT TYPE]="Other",6,
"#N/A - Select valid event type"))))))
The "EVENT TYPE" column is a Choice column with list of choices referenced in formula.
The returned data type in both the "general" SharePoint custom list (that is working) and the Calendar's "All Items" view is "Single line of text"
For the Calendar list I have tried changing return data format to number. I've also tried putting all the numbers in my formula in quotation with the 'single line of text' return data type.
It's baffling why same formula is working in one list, but not the other, with all the same settings for columns involved.
There are other calculated columns in same Calendar list, that reference other Choice columns in that list and are working fine.
I've tried both cutting/pasting the formula, and re-typing the formula in case column name wasn't identical. I get the same error, that it's a data type error.
All the web search I've done mentions using choice columns is allowed. I'm thinking it has something to do with the Calendar specific list, but as I mentioned, I have other calculated formulas in same list that are working.

To create dynamic dropdown list in excel 2013

I have one sheet containing the table name customer_id and Project_id.For each customer id various projects are displayed.when i try to create data validation by selecting all those it is not coming.for ex.
Customer_id Project_id
1 1.1
1 1.2
2 2.2
2 2.3
and like that.please tell me some solution.
This really depends on what you want exactly, but since your question is not that elaborate, I guess you mean this?
You can create a data validator from data in your worksheet in the following way:
Select the sheet you want the validator to be on
In the ribbon, click the data tab, and then Data validation
Select 'Allow List'
in the Source bar, select the cells with the allowed values
Another way, is to create a data validator using a vba or vb.net macro. In your macro say:
Dim range as Excel.Range = listSheet.Range("A1")
range.Validation.Add(Excel.xlDVType.xlValidateList, Excel.xlDVAlertStyle.xlValidAlertInformation, Excel.xlFormatConditionOperator.xlEqual, "Option1; Option2")
I guess what you want are two dropdown lists, the second depending on the value selected in the first one? (please elaborate your questions some more). To do that, I suppose there are other ways but this is what I usually do:
Take into account that I always use names to refer to ranges instead of references, to improve readness. If you have doubts to do it, read Use names in Excel formuas
Create a table or range somewhere in your book with one column with the master values.
I have named the range with the values master_list
Create a table or range somewhere in your book with two columns. The first column contains the master/look-up value and the second the dependent values.
I have named the list of look-up values (this is, the values in the first column) as dependent_list
I have named heading to the cell above the dependent_list (for example, if the dependency table starts in A2, the heading is A1
Order the lists
The master_list is ordered as you wish values appear in the dropdown list.
The dependent_list must be ordered by the values in the first column (master values). It doesn't matter if the order is the same in the master_list and the dependent_list, but identical values in the master column of the dependent_list must be together.
The order in the second column of the dependent_list will determine the order in the dependent dropdown list.
Optionally you can define a message to display in the dependent_list when there is no master value selected. I have named it msg_error.
Click on the cell where you want the master dropdown, ant go to the Data Validation menu, where you select:
Allow: List
Source: Add the formula =INDIRECT("master_list")
I have named the cell where the master dropdown list as key_value
Click on the cell where you want the dependent dropdown, and then go to the Data Validation menu, where you select:
Allow: List
Source: Add the formula =IF(key_value="";msg_error;OFFSET(heading;MATCH(key_value;dependent_list;0);1;COUNTIF(dependent_list;key_value);1))
Note that Excel functions are language dependent of the language and I have translated them to English, so maybe there are mistakes.

Excel:Add items to dropdown

I have a list of data in sheet1 in column A, I used these values as items in dropdown in column B same sheet. I have added the dropdown from datavalidation. Now if I add more values in column A the value added should be displayed in dropdown added.
Is there a way to achieve this?
I tried checking properties of the dropdown,I couldn`t see any name for the dropdown to add more items.
I think we got to write macro for this.
Please help.
If you add a name to the range in column a (highlight column a, choose the formulas menu and then define name) call it colA - then when you set up the drop down (data menu, data validation, LIST type put:
=colA
as the source.
Now whatever values are added to column A they will update the drop down list.

Resources