I'm not sure if this is what you mean, but perhaps this is what you want:
=IF(A1="foo",B1,IF(A1="bar",C1,""))
This says that if (assuming you entered this in column D and copied down)
column a (for that row) contains the word foo, return what is in column B
(for that row.) if not, then if A = "bar" then return column C otherwise
return nothing. This is called nested IFs and the current versions of Excel
are limited to 7 levels of nested IFs. The most common work around if you
need more tests than that is to use a lookup function such as vlookup or
index/match.
Is this what you were asking?
--
Kevin Vaughn
"leomanic@hotmail.com" wrote:
> Thanks for the help Kevin, works brilliantly!
>
> Sorry to be a pain, but there's also another thing along the same lines
> that I forgot to mention?
>
> Is there a way in which I could do this with 2 keywords? i.e. Keyword1
> puts figure X into a cell or if Keyword2 entered, puts in figure Y?
>
> Thanks
>
> Leo
>
> Kevin Vaughn wrote:
> > The most straightforward way of doing what you ask is with a formula in
> > column c. For instance, you could enter this formula into C1 and copy it
> > down:
> > =IF(A1="Keyword", B1,"")
> > Then, if in the corresponding row in column A you type Keyword, the cell in
> > column C will display what is in column B's cell. If not, it will display
> > nothing (which is signified by "")
> >
> > --
> > Kevin Vaughn
> >
> >
> > "Leo Edwards" wrote:
> >
> > > Hi there,
> > >
> > > I'm not sure whether this is possible, but is there a way in which typing in
> > > a specific word would result in information being copied from one cell into
> > > another?
> > >
> > > In simpler form: 'Keyword' typed into cell A (after verification) causes
> > > data to duplicate from cell B into cell C.
> > >
> > > Sorry to ask such a simple question, but any help would be greatly
> > > appreciated!
> > >
> > > Thanks
> > >
> > > Leo
>
>
Bookmarks