Need HELP - PLEASE

  • Thread starter Thread starter intheway
  • Start date Start date
I

intheway

What IF function can I use so that Excel will look at a cell in a row
if it is over 7,000, it should delete the row from the sheet, if it i
less than 7000, it should multiply the value by .096??

your help will be greatly appreciated - thank you in advanc
 
There isn't one :-) Formulas cannot make changes that affect the structure of
the workbook, they can only 'pull' data into the cell that the formula resides
in, whether that be through a link or a calculation. VBA however can do this if
you really wanted to go there.

That having been said, what you could do is to Autofilter on that column all
values LESS THAN OR EQUAL TO 7000, then select that column, do Edit / Go To /
Special / Visible Cells only, then do Edit / Delete / Entire Row. This gets rid
of all the 7000 and less values. Tak eoff the autofilter and you should see all
the values left that you want to multiply by 0.96

Now in any empty cell, put 0.96. Copy the cell, select the values you can see,
do edit / paste Special / Multiply and you ae done.
 
try this where your numbers are in col A

Sub doit()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 15 Step -1
If Cells(i, "a") > 7000 Then
Rows(i).Delete
Else
Cells(i, "a").Value = Cells(i, "a").Value * 0.096
End If
Next i
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top