formula on lookup column in calculation field of sharepoint - sharepoint

I have a list and it's columns is like below:
FirstName LastName Study has_Studied
a b civil yes
c f no
h k elec yes
study column is a lookup column and source of it's data is in another list.
now i want to make a calculation column like "Has_Studied" column at the top,and it's return value is (yes/no), that shows me "yes" when study column has value and when study column is blank, it shows me "no".
I have tried to make a formula but i got error about lookup column that i do not have access.
it seems easy but i do not know how to solve it

As Adam said, it’s by design that the lookup column can’t be used in SharePoint Calculated Column Formula.
The Supported and Unsupported Columns In SharePoint Calculated Column Formula:
https://blog.devoworx.net/2017/09/11/supported-fields-in-calculated-column-sharepoint/
Workarounds:
https://blog.devoworx.net/2017/09/11/lookup-field-in-calculated-column-sharepoint/

I think the lookup column is not supported in calculated fields. To achieve this You can use SharePoint workflow (for SP online You can use MS Flow). The workflow would be started on Item add event or Item updated. After that based on a simple condition You could populate the column.

Related

How do you write an array formula based on multiple criteria in MS Excel?

So I have two columns in MS Excel, Let's call them A and B, and I'm trying to create an array formula that let's me create a list from B, based on a specific paired item on the same row in column A. I know how to write a formula to return a list of unique values from one column, but is there a way to create a unique list from one column based on values from another?
Thanks in advance. I've been using this site for years but never had a question that wasn't answered previously. You've all helped me out so much in the past.
Here's an example of what I'm trying to do.(Hopefully this makes sense)
This isn't an exact copy of what I want but it's an approximation. I'm trying to fill out the colors of the corresponding car types without any duplicates.
Here is an example of getting the unique items in column B for column A having the value "mike" using Excel 365. Pick a cell and enter:
=UNIQUE(FILTER(B1:B12,A1:A12="mike"))

How to count unique column data in an excel sheet

I am using excel sheet and i have data column as shown below:
As we can see that some of the names are duplicate or appeared twice. My question is how can count unique name records or rows associated with each name for summary column.
Out put i am looking for is shown below:
Not sure which formula to use as count is counting all of that data i.e. '7' in this case. How can i use count or any other function to count unique records as shown above?
You can do what you're after with a pivot table.
Click the Insert tab then select "Recommended Pivot Tables".
A window will open up prompting you to select the data range. I recommend using a named range for your list and referencing that, but you can just highlight the list directly if you want.
Once the data range is selected, click "Ok" and new window will open with exactly what you want. A unique values list and a "Count of Column1". It is the default of the recommended pivot tables.
I outlined this because it's easy and fast, but it's important to understand you can make this pivot table yourself from scratch if you learn about pivot tables in general. Pivot tables are often overlooked in Excel as an option.
Lastly, you could get really advanced with Excel Power Queries. Just Google "Excel Power query" and you will be shown all kinds of information on them. They are a close second place in power to manipulate Excel data short of using VBA.
Good luck!
CountA(Unique(D2:D8,,False)) = 5 [Count(Unique(D2:D8)) is the same as False is the default.]
CountA(Unique(D2:D8,,True)) = 3 (once and only once)
Note: the Unique function was released in late 2019 to Office 365. So if you want to use this check your version, not present in 1908, present in 2006.
Edit: It's actually in 2002, I just updated my 1908 machine.
HTH
If names duplicates are removed the following formula can be used: =COUNTIF(B:B,F2)
If duplicates must be removed by formula, MATCH (searches for a specified item in a range of cells, and then returns the relative position of that item in the range.) and SMALL (Returns the k-th smallest value in a data set.) functions can be used as shown.
C$1048576 is used to reference last row number for a big list case.
formulas:
Column A, names sequence
Colunm B, names
Column C, formula =MATCH(B2,B:B,0)
Column D, formula =IF(COUNTIF(C2:$C$1048576,C2)=1,C2,"")
Column E, formula =SMALL(D:D,A2)
Column F, formula =VLOOKUP(E2,A:B,2,0)
Column G, formula =COUNTIF(B:B,F2)
For anyone like me without O265's lovely Unique & Filter Functions, and who doesnt want to use a pivot table, and there are many ways to do this, but this i have just done this in normal excel.
List of data in Column H, Formula in column O3. Drag down. Highlights your distinct and unique values from H.
=IF(COUNTIF(H:H,H28)=1,"U - "&COUNTIF(H:H,H28),IF(COUNTIF(H$1:H27,H28)=1,"U - "&COUNTIF(H:H,H28),"-"))
Formula is short. You can just do this and drag down. Apply the same principal to your worksheet data wherever it is.
=IF(COUNTIF(H:H,H3)=1,"U",IF(COUNTIF(H$1:H2,H3)=1,"U","-"))
Similarly, you can just use this formula here (credit goes to this source for this one):
=(COUNTIF($H$1:$H1,$H1)=1)+0
Id like to point out that the above formula is a better formula than mine. It highlights with a "1" (or with a tweak, the value of your choice) the first time any value is seen/spotted on any given list, whether duplicate or unique.
Whereas mine is a bit "more random" when picking up the "unique and distict" values.
Mine gets there in the end, but Extend Office's gets there first, as I think is proper (getting the first time a unqique distict value is spotted/occurs.).
Formula in K5 =IF((COUNTIF($H$5:$H5,$H5)=1)+0=1,"UNIQUE DIST","") and drag down...
You could append/add a normal basic countif after the results to show how many actual times the given value appears if you wanted. :
=IF((COUNTIF($H$5:$H5,$H5)=1)+0=1,"UNIQUE DIST","")&" - "&COUNTIF(H:H,H5)

what formula to use to show/match data with reference to another table?

i have 2 tables. about phone plan.
1: columns are, Combo and Price. Rows are 2,3,4,6,12(combo) and 28,38,44,66,131(price). Just showing how much each plan cost.
2: columns are, how much users pay each month(basically the price from 1st table) and the combo they are using.
Basically looks like this :
i want column H to show what combo the user is using with ref from column B? what formula do i have to use? i searched online and they said use index and match?
there are prices that are not correct, u can ignore if u want. pls help thanks.
Not sure where your result column will start but assume it is from cell H3 and this is the formula you can try:
=IFERROR(INDEX(B:B,MATCH(G3,C:C,0)),"")
Replace that "" with the content you want.

Event Receiver for lookup column value added should be updated in another column in same Sharepoint list

I am having the list named "XXX". In that list i have two columns named Status, which is the choice column and StatusLookup, which is lookup column. The both column should have the same choices values namely Open, Pending Approval, Cancelled. If add new item in sharepoint list, if i choose "Open" in Status column it should be automatically updated in StatusLookup column without any manual entry.
I need to know whether there is any way to update the StatusLookup column by choosing the value in Status column in Sharepoint list by using Event Receivers?
Can you please reply me as soon as possible?
Thanks,
Sugu.....
Sorry this is late but I think instead of a lookup column you want the second column to be a computed column. Then you want to make the formula be "=[choiceColumn]". The computed columns should then always automatically update to the value in the choice column.
Supposedly you can then create a lookup column on the computed column from another list but that didn't work for me (computed column wasn't availalbe for a lookup column) which is how I ultimately found this post. Let me know if you solved your problem.
-Rob

How do I link a calculated column to a column in another list in SharePoint?

I have 2 lists with some common columns. I need to multiply the Calculated Sum value (of a certain column) in one list by a particular column value in another list.
How would I achieve this?
The formula in a calculated site column can reference only other site columns that are in the same list or library. Therefore, when you add the calculated site column to a list or library, you must also add the site column that is referenced in the formula.
If I were you, I'd add a column where I LOOKUP the value from the List A, and then use that column for my calculated field in List B.
You can not use use/loockup a calculated column from the list A in List B unless doing some code and create an xslt formula filtring on SP Designer

Resources