I have two tables:
# BILLING PERIOD TABLE +-----------+ | id | value| ------------- | 1 | some | | 2 | else | xxxxxxxxxxxxx
and
# ELECTRICITY TABLE +----------------------------+ | billing period| value | ------------------------------ | 1 | desired val| | 2 | | | 3 | |
And I would like to write formula that takes and compares billing period id with billing period and puts value from billing period table to the cell value next to billing period
any help will be appreciated
As was suggested by @Tim Williams,
VLOOKUP()is the way to go.Assuming you’ve named the first table
BILLING_PERIOD, and the second tableELEC, and using your headers, in thevaluecolumn you would use:An extra touch can be to surround it with
IFERROR, to insert some default value if the id isn’t in the table, instead of showing a#N/Aerror.EDIT: just noticed that it wasn’t mentioned, but my assumption was that you are talking about two excel tables, if that was not the meaning, please be more specific.