Just can't get function to work right

dhammell

New Member
Joined
Nov 4, 2002
Messages
2
I have 3 columns on my worksheet. Column A contains codes, some are all numeric and some are alpha and numeric. Column b has dollar values. I need column c to check code in column A, and if it is between 767000 and 93971 multiply column b times 85%. If the code in column A does not fit the parameters, I would like column C to be blank or zero. I am doing something wrong.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

kskinne

Well-known Member
Joined
Feb 17, 2002
Messages
1,267
Office Version
  1. 365
Platform
  1. Windows
insert this formula in cell C1:

=IF(ISNUMBER(A1),IF(AND(A1<=767000,A1>=93971),B1*0.85,""),"")

and copy down as far as is needed. the formula takes column B value times .85 if the value in column A is a number and falls within the range you specified in your post - otherwise, if the data in A is either not a number, or does not fall within the range you specified, a blank is returned. modify as needed.

hth
kevin
 

mikefromUK

New Member
Joined
Oct 15, 2002
Messages
42
This should work (assuming you are in cell c1)

=IF(AND(A1>93971,A1<767000),B1*1.85,"")

This will put the output in C1.

Is this what you are after?

Cheers MG
 

Forum statistics

Threads
1,148,193
Messages
5,745,263
Members
423,941
Latest member
CluelessAboutExcel

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
Top