Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 48
  • Last Modified:

IF cell equals certain value then display text in cell

So I have a list of account codes in one column and the names of the accounts in the next column.

I then have a data entry table in which I enter the account code and an income amount $.

I want to make it so that a description column which follows the account number will auto populate upon entering the account code.

So it looks like this:

D6:D20 is account numbers
E6:E20 is account description
F6:F20 is income amount $

Then outside the data table I have the list of account codes and descriptions.
Codes are J3:J21
Descriptions are K3:K21

The thing I cannot figure out is how I can do an IF statement with multiple logics?

There is 15 account numbers and descriptions, the thing is the row in which they will be entered is not always going to be the same..

I mean I know the easy function if it was to always be on the same row..
=IF(D6=J3,"Grant Funding")
0
sam excel
Asked:
sam excel
1 Solution
 
Andrew WhiteCommented:
No need to use IF.

If understand your layout correctly, try =vlookup(d6,$J$3:$K$21,2,0)
0
 
Rob HensonIT & Database AssistantCommented:
To add error trapping if an invalid account code is entered:

=IFERROR(VLOOKUP(D6,$J$3:$K$21,2,FALSE),"Invalid Account")

Alternatively, to not allow invalid codes in the first place, apply Data Validation so that the user can select from a dropdown of valid codes.
0
 
Danny ChildIT ManagerCommented:
I think the guys above have nailed it, but if you have any further questions, an example sheet being attached would help a lot.
1
 
sam excelAuthor Commented:
Here is a sample of what I am referring to.

As you can see I basically want the cells in E to populate when a code is entered into D..

But any of those codes can be on any row each day so yeah.
excel-balancing.xlsx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now