0

I need to seach in an column if there are similar id's and if yes ro copy the group and insert in the empty cell.

I have the following table

Group  Status  ID
       Log in   1
       Log out  1
       Log in   3
       Log out  2
A               1
B               2
C               3

The table should look like this:

Group  Status  ID
A      Log in   1
A      Log out  1
C      Log in   3
B      Log out  2
A               1
B               2
C               3

To do this I tried to use this formula:

=IF(C2=(C4:C7);(A4:A7);IF(C2=(C4:C7);(A4:A7);""))

Unfortunatly it is not working, any idea why?

7
  • What is C4:C7 evaluate to? Should this be the sum? Count? Commented Feb 18, 2019 at 15:37
  • Do your groups correspond to IDs? I.E. A = 1, B = 2, C = 3 etc...? Commented Feb 18, 2019 at 15:37
  • The range. From C4 to C7. I want to check if C2 is equal with a value from this range Commented Feb 18, 2019 at 15:38
  • Yes, the groups correspound to ID's, but i need to find them and insert in the empy cells Commented Feb 18, 2019 at 15:39
  • Why not just use a VLOOKUP on Column A? Commented Feb 18, 2019 at 15:40

2 Answers 2

1

not sure if I get what you mean, but I'd try something like this

=INDEX($C$6:$C$8,MATCH(E2,$E$6:$E$8,0),1)
Sign up to request clarification or add additional context in comments.

1 Comment

Something like this. Thanks for the idea.
0
  1. Create a table that matches your IDs to Groups (table on right). This can be housed on a hidden sheet and updated in future as needed (which will be much easier to manage in comparison to updating tedious nested IF statements formulas)
  2. Insert VLOOKUP on your main table
  3. Drag formula down to end of range

In the formula, Table1 is the name of the right table that houses your matching Groups


result

enter image description here

formulas used

enter image description here

1 Comment

Thanks for the idea!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.