kirstysmith589
kirstysmith589

Reputation: 1

Copying data from another cell (if statement, maybe?)

I have two tabs of data and I want to be able to copy the data into one of the tabs if a certain criteria is met.

I know a VLOOKUP would suffice usually, however, one part of the data is going into a column within a pivot table.

Sheet 1 would contain:

Account Comment
1000    
1000    
1000    
1000    
1000    
1000    
1000    
3000    
3000    
3000    
3000    
3000    
3000    
5000    
5000    
5000    
5000    
5000    
7500    
7500    
7500    
7500    
7500    
7500    
7500    

Sheet 2 contains:

Account Comment
1000    Test
3000    Test 1
5000    Test 2
7500    Test 3

I would like to be able to show the the comments on sheet 2 in sheet 1.

So against 1000 in sheet one it would say 'Test', 3000 would say 'Test 1' etc.

Upvotes: 0

Views: 25

Answers (1)

shaun21uk
shaun21uk

Reputation: 110

Yes a compound IF statement will do this.

It really depends on how many different numbers you are going to be using as it will become very cumbersome with say 20+ numbers.

In the above example:

=IF(A2=1000,"Test",IF(A2=3000,"Test 1",IF(A2=5000,"Test 2",IF(A2=7500,"Test 3"),"")))

etc, continue as needed and copy down.

Upvotes: 1

Related Questions