HOW TO MAKE IF STATMENTS INTO ARRAYS

GoonSqd

New Member
Joined
Jan 30, 2023
Messages
11
Office Version
  1. 365
Platform
  1. Windows
hey there, im trying to change a co-workers if statements into an array if possible
im trying to validate that If Colum AA is 1 or greater then to check if Colum AQ is between 7.3 and 8.3 and if its anything else to check Colum y and if there is a date then colum AQ should be zero, if there isnt then check colum x and make that the value for colum AQ
 

Attachments

  • image001 (1).png
    image001 (1).png
    176.1 KB · Views: 6

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
You're asking for column AQ data to be read and then possibly changed. It can't be a value (say between 7.3 and 8.3) and then have a formula inside that cell to change it to zero if it isn't.

Are you asking to do this in VBA and not excel formulas?
 
Upvote 0
You're asking for column AQ data to be read and then possibly changed. It can't be a value (say between 7.3 and 8.3) and then have a formula inside that cell to change it to zero if it isn't.

Are you asking to do this in VBA and not excel formulas?
im trying to see if its possible to make an array to replace the if then formulas on the right hand side, in order to keep the file size down.
 
Upvote 0
you can't have two thingsin a cell, you are asking for AQ (that already has a value) to have a formula in AQ that changes its value.

What cell is the IF statement in? Your original request reads like you want it in AQ

You can help people help you by giving samples of your worksheets by using the xl2bb code (link below).
 
Upvote 0
I don't know how you can overwrite data in AQ.
Here is my interpretation of your IF statements:
Book1
BCDEFG
1
2ConditionsResult
3Col AACol YCol XCol AQIn What cell?
4"P"> 7.3 & < 8.3Value of AQ
5Not Blank00
6Not BlankValue of X
7"C"00
8
Sheet5
 
Upvote 0
I don't know how you can overwrite data in AQ.
Here is my interpretation of your IF statements:
Book1
BCDEFG
1
2ConditionsResult
3Col AACol YCol XCol AQIn What cell?
4"P"> 7.3 & < 8.3Value of AQ
5Not Blank00
6Not BlankValue of X
7"C"00
8
Sheet5
So essentially im trying to find the best way to make a new column that will first check or validates the logic that follows column "AA" which repersent a price increase 1= yes 0=no, Then i would like it to check column "AQ" and make sure the price increase is between 7.3-8.3 and if its not then to check column Y because thats when the price increase will happen and if has a number in column "x" then that means the price increase is capped at that value for the customer and should be represented in "column "AQ". I hope this makes sense any help is greatly appreciated.
 
Upvote 0
Okay I'm starting to understand. Please fill in the questions. In column Y what are you supposed to do with a date? Is this a date the price increase is to take effect or end? How do you want that reflected in the calculation?

Book1
ABCDEF
3
4ConditionsIncrease Date?Price Cap?Result
5Col AACol AQCol YCol XIn What cell?
61> 7.3 & < 8.3End of Conditions calculate nowWhat value to see?
71NOT(> 7.3 & < 8.3)Has a date?End of Conditions calculate nowWhat value to see?
81NOT(> 7.3 & < 8.3)Has a date?Cap amountEnd of Conditions calculate nowWhat value to see?
90End of Conditions calculate nowWhat value to see?
10
Sheet1
 
Upvote 0
Okay I'm starting to understand. Please fill in the questions. In column Y what are you supposed to do with a date? Is this a date the price increase is to take effect or end? How do you want that reflected in the calculation?

Book1
ABCDEF
3
4ConditionsIncrease Date?Price Cap?Result
5Col AACol AQCol YCol XIn What cell?
61> 7.3 & < 8.3End of Conditions calculate nowWhat value to see?
71NOT(> 7.3 & < 8.3)Has a date?End of Conditions calculate nowWhat value to see?
81NOT(> 7.3 & < 8.3)Has a date?Cap amountEnd of Conditions calculate nowWhat value to see?
90End of Conditions calculate nowWhat value to see?
10
Sheet1
The Date is when when the price increase will take effect, so if there is a date and there is no cap then i need it to return "correct" or True" i guess all i need is it to return a validation of good or bad with those set rules.
 
Upvote 0
The Date is when when the price increase will take effect, so if there is a date and there is no cap then i need it to return "correct" or True" i guess all i need is it to return a validation of good or bad with those set rules.
im Sorry i need it to check that if there is no date then AQ should read zero and validate that then return with correct or not
 
Upvote 0
Okay I'm starting to understand. Please fill in the questions. In column Y what are you supposed to do with a date? Is this a date the price increase is to take effect or end? How do you want that reflected in the calculation?

Book1
ABCDEF
3
4ConditionsIncrease Date?Price Cap?Result
5Col AACol AQCol YCol XIn What cell?
61> 7.3 & < 8.3End of Conditions calculate nowWhat value to see?
71NOT(> 7.3 & < 8.3)Has a date?End of Conditions calculate nowWhat value to see?
81NOT(> 7.3 & < 8.3)Has a date?Cap amountEnd of Conditions calculate nowWhat value to see?
90End of Conditions calculate nowWhat value to see?
10
Sheet1
SnipImage.JPG
 
Upvote 0

Forum statistics

Threads
1,215,072
Messages
6,122,968
Members
449,095
Latest member
Mr Hughes

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