Home

Excel formula help for auto populate

Highlighted
abanerjee
New Contributor

This is what I am trying to so we have 4 predfined values for column 'A' 

For example (P,Q,R,S)

and I want a formula to be automatically inserted in the Column 'B' as per the option I choose in column 'A' 

For example:

P = x+y

Q = x-y

R = x*y

S = x/y

 

so if i choose 'P' in a cell in column 'A'

in column 'B' in adjacent cell the formula 'x+y' should be auto populated.

 

Any help would be highly appreciated.

 

Note: New in excel and using Microsoft Excel for MAC version 16.21.1

2 Replies
Hi,

This should work,=IF(A1="P","x+y",IF(A1="Q","x-y",IF(A1="R","x*y", IF(A1="S","x/y"))))
As an alternative to Nested IFs, you may use CHOOSE, as follows:
=CHOOSE(MATCH(A1,{"P","Q","R","S"}),
"x+y","x-y","x*y","x/y")
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies