If Then?

  • Thread starter Thread starter Christian
  • Start date Start date
C

Christian

I have a spreadsheet containing historical numeric data. I would like
to create a second spreadsheet that looks at the data and creates a
text based checklist if the numerical data falls within certain
categories. I'm not sure the "If Then" formula will do this.

I also was wondering if there was a formula you could use to hide
certain rows and columns on a spreadsheet based on some conditions.
Almost like how I can change colors of a cell with conditional
formatting.

Thanks in advance for any help!
 
I have a spreadsheet containing historical numeric data. I would like
to create a second spreadsheet that looks at the data and creates a
text based checklist if the numerical data falls within certain
categories.
Can you give an example of the Sheet1 data and the corespondng data in
the new sheet?

With regards your second query that should be relatively easy to do in
code, but I can not think of a formula.

Pseudo Code
If the Active Row contains the conditions then
Hide entire Row
 
A formula won't "hide" rows but a macro will

for each cell in range("a3:a300")
if cell=3 then cell.entirerow.hidden=true
next
 
To hide rows based on a condition, look in Data=>Filter=>Autofilter

The if formula should do this. Depends on how many categories you have. If
there is a numerical sequence to the conditions, you might be able to use a
lookup table or calculate the category.
 
A non-macro suggestion:

Insert a new helper column (say A). Then put a formula in that cell that does
your check.

Then apply Data|Filter|Autofilter
and filter by that column.

For instance, if the check were to just look at column C to see if it's less
than 10, but greater than 3, you could do:

=and(c3<10,c3>3)

And filter by True to hide the Falses.

You can make that formula as complex as you want--just copy it down the range
when you've got it working.
 
Back
Top