Referencing value in previous row to assign a contact
On a Requests Sheet, I have a column for Assigned Supervisor. I want to write a column formula that will add a contact based on the previous row's assignment. I'd like to rotate through a list of supervisor contacts each time a form is submitted.
I created a separate Assignment sheet that has a column of the Supervisor and a column Next Assigned Supervisor. I'm trying to write the formula using INDEX and MATCH in the Assigned Supervisor columns of the Requests Sheet that will match the value of the previous row's Assigned Supervisor tp the Assignment sheet's Supervisor Column and return the Next Assigned Supervisor value.
The two areas I am struggling with are:
- How do I reference the previous row in the column formula?
- How do I account for the first row in the column formula?
I'm also open to other approaches.
Answers
-
Hi, Victoria. Not sure that INDEX/MATCH is going to help you out here. You may need to use VLOOKUP or a nested IF formula, depending on how many Supervisors you have.
Let's say you have 10 supervisors. You could use a nested IF to determine who the next supervisor to be assigned should be. Set up your [Assigned Supervisor] column as a dropdown menu that includes each supervisor's name. Then, create a [Next Assigned Supervisor] column with this column-level formula:
=IF([Assigned Supervisor]@row = "Alice", "Barbara", IF([Assigned Supervisor]@row = "Barbara", "Charlene", IF([Assigned Supervisor]@row = "Charlene", "Dorothy", IF([Assigned Supervisor]@row = "Dorothy", "Edith", IF([Assigned Supervisor]@row = "Edith", "Francine", IF([Assigned Supervisor]@row = "Francine", "Georgia", IF([Assigned Supervisor]@row = "Georgia", "Harriet", IF([Assigned Supervisor]@row = "Harriet", "Irene", IF([Assigned Supervisor]@row = "Irene", "Jessica", "Alice")))))))))
Now, when a name is chosen in the [Assigned Supervisor] column, the [Next Assigned Supervisor] column will automatically select the next supervisor to be assigned based on the logic in your nested IF formula.
If you have a large set of Supervisors and need VLOOKUP guidance, it would be helpful to see the structure of your sheets to suggest a formula.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!