Auto populate

%3CLINGO-SUB%20id%3D%22lingo-sub-2783380%22%20slang%3D%22en-US%22%3EAuto%20populate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2783380%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%202%20cells%2C%20cell%201%20will%20have%201%20of%203%20different%20numbers%20in%20it%20(%2435%2C%20%2445%20or%20%2450).%20I%20would%20like%20a%20cell%202%20to%20populate%2015%20if%20cell%201%20is%20%2435%2C%2020%20if%20cell%201%20is%20%2445%20or%2025%20if%20cell%201%20is%20%2450.%20Is%20there%20a%20formula%20that%20will%20do%20this%3F%20Please%20help%20as%20I%20have%20tried%20everything%20I%20can%20think%20of....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2783380%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2783392%22%20slang%3D%22en-US%22%3ERe%3A%20Auto%20populate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2783392%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1166016%22%20target%3D%22_blank%22%3E%40Megan2804%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet's%20say%20the%20first%20cell%20is%20A2.%3C%2FP%3E%0A%3CP%3EIn%20the%20other%20cell%2C%20enter%20the%20formula%3C%2FP%3E%0A%3CP%3E%3DIF(A2%3D%22%22%2C%22%22%2CIF(A2%3D35%2C15%2CA2-25))%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I have 2 cells, cell 1 will have 1 of 3 different numbers in it ($35, $45 or $50). I would like a cell 2 to populate 15 if cell 1 is $35, 20 if cell 1 is $45 or 25 if cell 1 is $50. Is there a formula that will do this? Please help as I have tried everything I can think of....

 

Thank you in advance  

5 Replies

@Megan2804 

Let's say the first cell is A2.

In the other cell, enter the formula

=IF(A2="","",IF(A2=35,15,A2-25))

Yes! Is there a way to keep it blank or 0 if nothing is entered into cell 1?

@Megan2804 

The formula already does that.

@Megan2804 

Just so that you may have choice!

= SWITCH(list,
      35, 15,
      45, 20,
      50, 25,
      "")

= IFERROR(
    LOOKUP(list, {35,15;45,20;50,25}),
  "")

= XLOOKUP(list, numbers, output,"" )

Of these only the 2nd works with Excel versions older than 2019.

@Megan2804 

If to hardcode the logic

=5*( 3+INT((A1-35)/7.5) )

and other variants in this direction