Formula to pick a value and add stars(*) in a different cell

jskasango

Board Regular
Joined
Jul 18, 2012
Messages
202
Office Version
  1. 365
Platform
  1. Windows
I need a formula to place the value from C3 to E3 and add stars(*) if D3 meets 3 conditions. 1) If D3 multiply by 2 is less than 4, one star. 2) If D3 is greater than 4 but less than 6, two stars. 3) If D3 is greater than 6, three stars.

1642711472378.png
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Also what should happen if D3 is something like 2.57?
It doesn't meet any of your 3 criteria.
 
Upvote 0
Hi,

What happens if D3*2 or D3 is Exactly 4 or 6 ?
If value in D3 is greater than 2 but equal to and less than 4, it is one star. If D3 is equal to or greater than 6, three stars.
 
Upvote 0
If value in D3 is greater than 2 but equal to and less than 4, it is one star. If D3 is equal to or greater than 6, three stars.

Ok, based on your latest info, it would seem pointless to multiply D3 by 2, so see if this is what you want, keep in mind, by adding the *** , the results are Text:

Book3.xlsx
CDE
3-5.192.57-5.19 *
410.892.5710.89 *
512.19512.19 **
6-19.6912.59-19.69 ***
737.15437.15 *
Sheet948
Cell Formulas
RangeFormula
E3:E7E3=C3&IF(D3>=6," ***",IF(D3>4," **"," *"))
 
Upvote 0
Ok, based on your latest info, it would seem pointless to multiply D3 by 2, so see if this is what you want, keep in mind, by adding the *** , the results are Text:

Book3.xlsx
CDE
3-5.192.57-5.19 *
410.892.5710.89 *
512.19512.19 **
6-19.6912.59-19.69 ***
737.15437.15 *
Sheet948
Cell Formulas
RangeFormula
E3:E7E3=C3&IF(D3>=6," ***",IF(D3>4," **"," *"))
Thanks! This has worked! Let me find out from my supervisor why we should multiply D3 by 2. Before I mark as solved.
 
Upvote 0
Thanks! This has worked! Let me find out from my supervisor why we should multiply D3 by 2. Before I mark as solved.
The boss has not yet replied but just a quick one, how do I include (NumberFormat = "0.00") in the formula so as to suppress excess decimals?
 
Upvote 0
Another option
Excel Formula:
=TEXT(C3,"0.00 ")&REPT("*",IF(D3<=4,1,IF(D3<=6,2,3)))
 
Upvote 0

Forum statistics

Threads
1,213,496
Messages
6,113,995
Members
448,539
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top