vlookup result

A

anna

i created a vlookup function followed by an if condition
so that my result will not be N/A when a match is not
found.

However, I would like the result to be the current cell's
value and not a blank or specific value.

The cell has a current value and will only be updated if
it has a match so when a match is not found i don't want
the original value to be overwritten.
 
A

anna

i'm thinking of creating a new column containing having a
backup of the columns that have the value of the current
cells.

After it does a vlookup and does not find a match i'll
tell it to do a lookup in my backup column to retrieve
the old value and not have n/a.

understand? does it make sense?

-----Original Message-----
Anna,

You would need to use the worksheet calculate event and
another cell as a history cell, since Excel doesn't store
previous results.
For example, this event:

Private Sub Worksheet_Calculate()
If Range("A1").Value <> "" And _
(Range("A1").Value <> Range("B1").Value) Then
Range("B1").Value = Range("A1").Value
End If
End Sub

will store any non "" value from A1 in Cell B1. So if
your formula in A1 is along the lines of:
 

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

Top