5 Replies Latest reply on Nov 7, 2017 9:20 AM by Deepak Rai

# Calculation

Im having trouble coming up with a calculation to combine  two sheets together. What I am trying to do is have the ticket number show if the user name in sheet one shows in the summary field of sheet 2. any ideas?

USER NAME          Summary field                                                 TICKET

CONABC                Departure Nov/06/2017 CONABC 7929              123456789

• ###### 1. Re: Calculation

IF ATTR(USER NAME)=ATTR(SHEET2.USER Name) THEN "Ticket Number" Else 0 END

• ###### 2. Re: Calculation

This should work if you've already joined/blended the data:

If find([summary field], [user name]) <> 0 then [ticket number] else 0 end

If you haven't already joined, you could do a join calculation where you join [user name] to

mid

(

[summary field],

find([summary field], [user name]),

len([user name])

)

• ###### 3. Re: Calculation

Upon further contemplation, I don't think my suggestion about the join calculation will work.  You cannot refer to [user name] in the calc.  If the usernames are the same length and you're expecting to find them in the same spot of each summary field, you can still apply this logic and just "hard code" it.  If not, I think you'll need to join based on another field.  Once joined, the first suggestion I gave should work:

If find([summary field], [user name]) <> 0 then [ticket number] else 0 end

• ###### 4. Re: Calculation

thanks for the reply

I tried the calculation but didn't work. got an error

• ###### 5. Re: Calculation

Daniel,

It is also Good to have a packaged Workbooks. I don't know exactly what you need, because description is not always clear. So I just wrote the calc.