First off this is in Microsoft Office 2010.
I’m comparing two different worksheets each with a list of permissions. ‘Worksheet1’ contains our new POS permissions while ‘Worksheet2’ contains our current POS permissions. I am essentially going through our old permissions and finding the new permission that matches.
On Worksheet1 column A contains the permission (a string) while column B contains the row number from Worksheet2 with the similar permission. Column C on Worksheet1 contains the referenced (old) permission (a string) from Worksheet2 based on the row # listed in column B of Worksheet1. So essentially on Worksheet1 you have column A with the new permission, column B with the row number of the same permission from Worksheet1, while column C actually contains the old permission. For example for the reference from column C I used ‘=INDIRECT(“Worksheet2!B”&B2)’ on row 2.
Now what I am attempting to do is also record which permissions from Worksheet2 are already accounted for without having to manually enter in the referenced row from Worksheet1. Using the same format I’ll have the permission (a string) while column B contains the row number from Worksheet1 which contains the complementary permission. Finally in column C the actual permission string based off the row given in column B.
So essentially I am attempting to find if Worksheet1 column B contains the number of the row on Worksheet2. If it does I would like for the cell to be populated with the row number on Worskheet1 containing the referenced row from Worksheet2. From there I can use the INDIRECT example I provided above to finish row C. But for now I am stuck with figuring out Worksheet2 column B.
And I’m not sure if I explained all this clearly, if not please ask I’ll gladly make an necessary clarifications. Thank you in advanced for the assistance.
Example for clarification
Worksheet1 – Row 2
-
Column A (New Permission Name): SYSTEM > MODIFY LIST VIEW
-
Column B (Referenced row from WS2 which I will manually fill in): 146
-
Column C (Referenced permission name from WS2 based on row given in
Column B, generated with INDIRECT): rPro – Retail Pro v8 – System – Modify List View
Worksheet2 – Row 146
-
Column A (Old Permission Name): rPro – Retail Pro v8 – System – Modify List View
-
Column B (Row # from WS1 where Column B == 146, should autopopulate): this is what I’m looking to auto-generate based on if this row is referenced in WS1 in Column B) in this case the number that should show up is 2
-
Column C (Referenced permission name from WS1 based on row given in Column B, generated with INDIRECT): SYSTEM > MODIFY LIST VIEW
Worksheet 1 – column D – put
=ROW()Worksheet 2 – Column B –
=VLOOKUP(row(),sheet1!B:D,3,FALSE)if you want to avoid #N/A then wrap the function in the
iferror()function