Formula to check 'D' and place calculated value in specific cell

PurrSent

Board Regular
Joined
Jun 7, 2014
Messages
142
I would like to create a formula that will look at the value in D6, ie 1,2 or 3 etc) and ...

- if the value in D6 is '1', then put '25' (£) into M6.
- If the value in D6 is '2', then to put '25' into M6 AND O6.
- If the value in D6 is '3', then to put '25' into M6, O6 AND Q6 etc

I'm rather a novice at creating formulae, as it's been several years since studying Excel, so I've forgotten most of what I learnt. I tried this formula (below) but it returned '25' into the cell where I typed the formula, and not into L6 :( So, almost right – not bad for a bit of guess work

=IF(D6=1, "25", M6)

Would you be able to help me with a formula which would achieve this, or point me to a tutorial?

Once I've got this formula sorted, I then want to progress to, again based on the values in 'D' column, ie 1, 2, 3 etc, to place '3' (£3) x value D6 (and subsequently, all D Column), into another column, ie

Many thanks. I’ll be most grateful for your help and advice
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
1. "- If the value in D6 is '3', then to put '25' into M6, O6 AND Q6 etc"

What does etc mean?
You seem to be putting values in every 2 columns?
So is that what you mean or something different? If thats what you mean then specify clearly you want the value in every two columns from column M onwards.
We can't guess the right answer, you need to be specific.

2. "where I typed the formula, and not into L6"
Nowhere in your description does it mention L6. Why are you putting values into a cell you haven't specified?


Try this

in M6
=IF(D6=3,25,"")
in O6
=IF(D6=3,25,"")
in Q6
=IF(D6=3,25,"")

Insert into other cells you want the value.
 
Last edited:
Upvote 0
Thanks Special-K99

My apologies for not explaining more clearly. I found it hard to describe what I was wanting to achieve. Thanks for suggesting the formulae. They have helped me understand it a bit better.

"etc" was to indicate the pattern was to continue. Yes, you described it well by suggesting 'every second column'. However, your formulae doesn't quite do what I need.

When '1' is in D6, I want '25' to go into M6, but when '2' is in D column, I want '25' in M column AND another '25' in O column. If '3' is in D column, I want '25' in M and O and Q. Initially, there are up to 10 cells to take '25', of which some may only have '25' in the first column, ie M, while other rows may have a higher number.

So, column D will show the number of '25' to be placed in cells in that row, which could be any number up to 10. Once I have a formular for the row D6, then I'll be able to copy the formula down the rows, of course.

I do hope this helps explain what I'm wanting?

Many thanks for your help ;)
 
Upvote 0
My apologies too for not reading your requirements correctly.

So D6 will be no greater than 10.

Have you got any data in columns N P R etc or can those columns be overwritten.
If not you can have one formula copied from M to AE that only fills in columns M O Q etc with data.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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