Excel formula help,,,,

Author
Discussion

tvradict

Original Poster:

3,829 posts

274 months

Sunday 3rd February 2008
quotequote all
Need some help with a formula in an Excel workbook.

I've got a Cell, which I want to do one of 2 things depending on the value in another cell.

I'll explain as best I can. The Cell I need the formula in is C6. There is information in D6 - G6. H6 will be a Yes or a No in it. (Could do with having that in a drop down menu but cant work it out)

Now. heres what I need.

If someone enters a 1 in C6, and there is a No in H6, I need all the information from D6 - H6 to be deleted.

If Someone enters a 1 in C6 and there is a Yes in H6 I need all the information E6 to H6 Saved and D6 deleted!

can it be done??

TIA
Stuart

GasMonkey

475 posts

221 months

Sunday 3rd February 2008
quotequote all
Not sure if formulas can hide / delete columns, you could record a macro ?
Cant you just filter the results

[leymans terms] Select all data > Click 'Data' > Filter 'Autofilter' [leymans terms]

You can then copy / paste / sort the data into another spreadsheet

Olf

11,974 posts

218 months

Sunday 3rd February 2008
quotequote all
It can but you'll need a VBA script for the "Save" function.

Do you really mean save or do you mean just leave it be in the spreadsheet? If you do need a actual save function that'll need a script, the other stuff you are asking can probably be done with an equation.

Edited by Olf on Sunday 3rd February 08:43

tvradict

Original Poster:

3,829 posts

274 months

Sunday 3rd February 2008
quotequote all
Sorry, that was unclear, I just need the data left in the spreadsheet rather than saving the workbook.

mmm-five

11,245 posts

284 months

Sunday 3rd February 2008
quotequote all
Normally some simple IF statements would work.

You could hide the results using conditional formatting, but doing a formula where the cell contents are deleted whilst relying on those very same cell contents (H6 in this case) to do the formula would cause an error.