if cell blank do "x", if cell zero do "y", if cell > zero do

liquidrobot

New Member
Joined
May 13, 2002
Messages
9
please, i'm new to excel scripting...

how do a write a condition that can check a currency column (has to be a number) that can know if the column has anything in it?

if the cell has no input i want to do "x",
if the cell has a zero i want to do "y",
if the cell has a number greater than one i want "z"

thanks...
 
Re: if cell blank do "x", if cell zero do "y", if cell > zero do

The cell can't be blank if it does that, so I'd suspect it has a formula in it?
Try something like:
=IF(AND(ISNUMBER(I2),I2>5),1,"")
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Re: if cell blank do "x", if cell zero do "y", if cell > zero do

u r amazingggggggggggggggggggggggggg,that really worked fine u have no idea how thankful i am :) and u r right, it does have a formula in it but i didnt know it would make any difference bec. i have another formula in the previous column =+IF(I2<=5,1," ") but when the cell is blank it doesnt put anything, anyways thank you again for ur help :)
 
Upvote 0
Re: if cell blank do "x", if cell zero do "y", if cell > zero do

I need to add a wrinkle. In my column A is a mix of numbers and text. Column B is the sum of the numbers in column A up to that row.
First question- how do I make a cell blank (not 0) if value is 0 other than "IF value = 0 then font color = white"? Custom number category?
Question 2- In column B I want Excel to look left and if it sees a blank, blank the cell in column B. Don't show the running total. But if there's a number, look up until you see a number (may be 1 row, may be 6 rows) and add the number to the left to it.

Maybe add left to above and if no change (ie.. column A = 0/ blank) then set font color white.

Confused? Maybe this will help-
What I have
A.......B
2...... 2
22.....24
0......24
376...400
0.....400
0.....400
0.....400
77....477
533..1000

What I want
A.......B
2...... 2
22.....24
.........
376...400
.........
.........
.........
77....477
533..1000


I figure there's got to be a more direct way then setting the font color.

Any ideas?
 
Upvote 0
Re: if cell blank do "x", if cell zero do "y", if cell > zero do

Hello All, this may be simple, but my brain is just not working. I have 3 columns that are either blank or have a date in the. I need to add 50 if blank or add 0 in a date is entered. Is there a simple solution for this? Thanks for any help.

John
 
Upvote 0
Re: if cell blank do "x", if cell zero do "y", if cell > zero do

As I understand it, this one should be relatively easy:

Assuming your date is in cell A2, and the cell you are adding the 50 to is in A1.

=if(isnumber(A2),A1+50,A1)

You meantioned three columns with info. Just use the formula in three additional columns and sum the total in the fourth.

Mike
 
Upvote 0
Re: if cell blank do "x", if cell zero do "y", if cell > zero do

I need to add a wrinkle. In my column A is a mix of numbers and text. Column B is the sum of the numbers in column A up to that row.
First question- how do I make a cell blank (not 0) if value is 0 other than "IF value = 0 then font color = white"? Custom number category?
Question 2- In column B I want Excel to look left and if it sees a blank, blank the cell in column B. Don't show the running total. But if there's a number, look up until you see a number (may be 1 row, may be 6 rows) and add the number to the left to it.

I wasn't able to do it in one cell, but this is what I came up with:

Code:
cell B1: 2 (you write it in manually)
cell B2: =B1+A2
cell B3: =IF(A3>0,SUM(A$1:A2)+A3,"")

Then you can copy/paste from cell B3 on down. Just make sure you don't leave out that one $.

ETA: Whoops, I realized that my original answer gave the wrong total. I fixed it.
 
Last edited:
Upvote 0
Re: if cell blank do "x", if cell zero do "y", if cell > zero do

Hi, I have four values, I write down every one at the end of quarter. And additional (one) value which I write independently in some indefinite time of year. And now I need to show the latest number which was write to the excel spreadsheet.’

2,5 (additional value) 3 4 5 3 “x” – value written last one

Can anyone help me.
 
Upvote 0
Re: if cell blank do "x", if cell zero do "y", if cell > zero do

Hi, I have four values, I write down every one at the end of quarter. And additional (one) value which I write independently in some indefinite time of year. And now I need to show the latest number which was write to the excel spreadsheet.’

2,5 (additional value) 3 4 5 3 “x” – value written last one

Can anyone help me.

What do you want to get - 2,5 or 3 and where do you enter these numbers?
 
Upvote 0
Re: if cell blank do "x", if cell zero do "y", if cell > zero do

What do you want to get - 2,5 or 3 and where do you enter these numbers?

3 4 5 3 - this numbers are written at the end of quarter. And 2,5 can be written e.g. 15th july (or other day of year), and now I need to find formula, that at the end of III quarter (or other quarter of year) is comparing 3 4 5 3 and 2,5, showing number which were written last. In above example it should return 5 (value at the end of 3 quarter) because it was write further than 2,5 (15 july).
 
Upvote 0

Forum statistics

Threads
1,215,204
Messages
6,123,630
Members
449,109
Latest member
Sebas8956

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