Forum Discussion
Data Validation to Auto-Populate Adjacent Cell
- Aug 16, 2019
Hi abrewer1
What I understood from your post is that you need corresponding data upon inputting Account Number. You may achieve this by using Index & Match function.
Sample file is attached, please let me know if this works for you or otherwise.
Tauqeer
Thank you so much for your time here helping us!
I followed the sample that you uploaded in this thread for abrewer1 (I'm using 365), and it worked! Thank you!!
Question though...
I used this formula that appears in the sheet (and modified it to my cell ranges, sheets, etc.):
=INDEX($B$2:$B$71,MATCH(E2,$A$2:$A$72,0))
I didn't use this formula which also appears in the sample spreadsheet:
=IFERROR(INDEX($C$2:$C$80,MATCH(G2,$A$2:$A$106,0)),"")
I'm wondering why there are two different formulas? Do I need to use them both? Because it seems to be working with just the first formula.
Thank you again so much for your time and help! 🙂
Diane
HIi DianeDennis
Both formulas are the same and will produce the same result.
The only difference is that we usually wrap any formula with IFERROR() to handle errors in the formulas. IFERROR() returns a value that we specify if a formula evaluates to an error; otherwise, it returns the result of the formula.
In our example, if we do not wrap the first formula with IFERROR() it may give #N/A.
IFERROR() gives us the option to replace #N/A or other types of errors with 0, space, blanks or any value that we may think is suitable.
Thanks
Tauqeer
- DianeDennisNov 10, 2022Copper Contributor