Multiply Formula Based Off Several Texts

Treesh1994

New Member
Joined
Aug 15, 2023
Messages
45
Office Version
  1. 2019
Platform
  1. Windows
What I am looking to do is have an autofill on A18 on down based on the number of vehicles from AT1. In this example I chose 6. I prefilled the information in on column A QTY section.

The High lighted words on H26, H30, H31 needs to have a total of 2 per vehicle. The rest of the lines in column H needs to be 1 per vehicle.

The words in H26, H30, H31 may be moved throughout the document so I want a formula that it doesn't matter where it is on the page. If the word ELUC3H010D, EMPS1STS4RBW, or EMPS2QMS5RBW shows up in the document, I want excel to know it needs to be multiplied by 2, and the rest by 1.


I hope this makes sense and someone can help me make a formula!

1692203608245.png


EDIT:
Also I forgot to mention, that I don't want to use VBA if at all possible
 

Attachments

  • 1692203174825.png
    1692203174825.png
    211.8 KB · Views: 3
Last edited by a moderator:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Welcome to the MrExcel board!

It is hard to see exactly what data is in what columns. For the future, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with & it will clearly show the columns & rows.

So, you may have to adjust the columns, but does this help?

Treesh1994.xlsm
AHIJKAT
16
17
186a
1912ELUC3H010D
206c
216d
2212EMPS2QMS5RBW
236f
246g
256h
2612EMPS1STS4RBW
2712EMPS1STS4RBW
286k
296l
306m
3112EMPS2QMS5RBW
Sheet1
Cell Formulas
RangeFormula
A18:A31A18=AT$1*(1+OR(I18={"ELUC3H010D","EMPS1STS4RBW","EMPS2QMS5RBW"}))
 
Upvote 0
=AT$1*(1+OR(I18={"ELUC3H010D","EMPS1STS4RBW","EMPS2QMS5RBW"}))
Pete,

Thank you for that information!

I will keep that in mind next time I need to post regarding the XL2BB!

When I plug that formula into the spreadsheet, it only multiplies everything x1. Was it working on your end when you recreated it?
 
Upvote 0
Was it working on your end when you recreated it?
Yes, you can see it in A18:A31 of my mini sheet.

Start a fresh worksheet
Copy my mini sheet using this icon at the top left:
1692272806082.png


Select A1 of your blank fresh worksheet and Paste and see what happens
 
Upvote 0
Yes, you can see it in A18:A31 of my mini sheet.

Start a fresh worksheet
Copy my mini sheet using this icon at the top left: View attachment 97301

Select A1 of your blank fresh worksheet and Paste and see what happens
After looking at the formula, I messed up on my end!

I do have it working now! Thank you for your help on this!

One more thing if you can help, If the column "H" that I showed in the first post is blank, can we have the QTY section (A18) blank as well instead of putting a number?

Thank you again for your help on this!
 
Upvote 0
After looking at the formula, I messed up on my end!

I do have it working now!
Good news!

If the column "H" that I showed in the first post is blank, can we have the QTY section (A18) blank as well instead of putting a number?
As I said earlier, I can't tell what is column H from your image so I will assume that is what I had shown as column I in my mini sheet.

Is this what you meant?

Treesh1994.xlsm
AGHIJKAT
16
17
186a
1912ELUC3H010D
20 
216d
2212EMPS2QMS5RBW
236f
246g
256h
2612EMPS1STS4RBW
2712EMPS1STS4RBW
28 
29 
306m
3112EMPS2QMS5RBW
Sheet1
Cell Formulas
RangeFormula
A18:A31A18=IF(H18="","",AT$1*(1+OR(H18={"ELUC3H010D","EMPS1STS4RBW","EMPS2QMS5RBW"})))
 
Upvote 0
=IF(H18="","",AT$1*(1+OR(H18={"ELUC3H010D","EMPS1STS4RBW","EMPS2QMS5RBW"})))
Yes that is exactly what I am looking for!

Thank you so much for your help on this!

I do have one more question (I promise I am done after this lol)

I do have one option that we give money back to the customer.
99B is the option code that we will give back money lets say 100.00.
Is there a way you can add this to the formula above to show the QTY of -6 from the first example above?

Thank you so much for your help on this! It is greatly appreciated!
 
Upvote 0
99B is the option code
I have no idea what an 'option code' is and cannot see it mentioned anywhere in your sample so I have no idea how or if the extra condition can be added to the formula.
 
Upvote 0
I have no idea what an 'option code' is and cannot see it mentioned anywhere in your sample so I have no idea how or if the extra condition can be added to the formula.
I am sorry I should have specified better.

Like the examples above with the ELUC3H010D, EMPS2STS5RBW, And EMPS2QMS5RBW, 99B is another option but this time instead of multiplying by 2, I need to show a negative 1 per vehicle.

I hope this is enough information, sorry for the confusion with this
 
Upvote 0
Like this then?

Treesh1994.xlsm
AGHIJKAT
16
17
186a
1912ELUC3H010D
20 
21-699B
2212EMPS2QMS5RBW
Sheet1
Cell Formulas
RangeFormula
A18:A22A18=IF(H18="","",IF(H18="99B",-AT$1,AT$1*(1+OR(H18={"ELUC3H010D","EMPS1STS4RBW","EMPS2QMS5RBW"}))))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,161
Messages
6,123,377
Members
449,097
Latest member
Jabe

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