Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Adding a cell reference to an if then function

I have the following function:
=IF(H4="Like_New","Great condition, may contain minor
wear",IF(H4="Very_Good","Contains considerable wear, still very usable
though",IF(H4="Brand_New","MINT")))

and after the then statement I need it to read a number from a relative cell
reference. But when I try to reference a cell inside the function it only
copies the name of the cell (ex. E6) and won't actually copy the contents of
the cell. If I try to reference the cell outside of the function it doesn't
work and I get a reference error message.

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Adding a cell reference to an if then function

Do you want the same cell reference to apply to every IF?

Try it like this:

=IF(H4="Like_New","Great condition, may contain minor
wear",IF(H4="Very_Good","Contains considerable wear, still very usable
though",IF(H4="Brand_New","MINT")))&" "&E6


--
Biff
Microsoft Excel MVP


"Timmah18" wrote in message
...
I have the following function:
=IF(H4="Like_New","Great condition, may contain minor
wear",IF(H4="Very_Good","Contains considerable wear, still very usable
though",IF(H4="Brand_New","MINT")))

and after the then statement I need it to read a number from a relative
cell
reference. But when I try to reference a cell inside the function it only
copies the name of the cell (ex. E6) and won't actually copy the contents
of
the cell. If I try to reference the cell outside of the function it
doesn't
work and I get a reference error message.

Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Adding a cell reference to an if then function

OMG that worked. I don't understand how it works though, what does the &" "
& mean and why couldn't I just use the standard cell reference (=E6)?

"T. Valko" wrote:

Do you want the same cell reference to apply to every IF?

Try it like this:

=IF(H4="Like_New","Great condition, may contain minor
wear",IF(H4="Very_Good","Contains considerable wear, still very usable
though",IF(H4="Brand_New","MINT")))&" "&E6


--
Biff
Microsoft Excel MVP


"Timmah18" wrote in message
...
I have the following function:
=IF(H4="Like_New","Great condition, may contain minor
wear",IF(H4="Very_Good","Contains considerable wear, still very usable
though",IF(H4="Brand_New","MINT")))

and after the then statement I need it to read a number from a relative
cell
reference. But when I try to reference a cell inside the function it only
copies the name of the cell (ex. E6) and won't actually copy the contents
of
the cell. If I try to reference the cell outside of the function it
doesn't
work and I get a reference error message.

Any ideas?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Adding a cell reference to an if then function

The & is the concatenation operator.

&" " concatenates a space
&E6 concatenates the value of cell E6

The concatenation operator does the same thing as the CONCATENATION function
but is easier and results in a shorter formula.

Both of these formulas do the same thing:

A1 = Try
B1 = this

=A1&" "&B1
=CONCATENATE(A1," ",B1)

Both return: Try this

--
Biff
Microsoft Excel MVP


"Timmah18" wrote in message
...
OMG that worked. I don't understand how it works though, what does the &"
"
& mean and why couldn't I just use the standard cell reference (=E6)?

"T. Valko" wrote:

Do you want the same cell reference to apply to every IF?

Try it like this:

=IF(H4="Like_New","Great condition, may contain minor
wear",IF(H4="Very_Good","Contains considerable wear, still very usable
though",IF(H4="Brand_New","MINT")))&" "&E6


--
Biff
Microsoft Excel MVP


"Timmah18" wrote in message
...
I have the following function:
=IF(H4="Like_New","Great condition, may contain minor
wear",IF(H4="Very_Good","Contains considerable wear, still very usable
though",IF(H4="Brand_New","MINT")))

and after the then statement I need it to read a number from a relative
cell
reference. But when I try to reference a cell inside the function it
only
copies the name of the cell (ex. E6) and won't actually copy the
contents
of
the cell. If I try to reference the cell outside of the function it
doesn't
work and I get a reference error message.

Any ideas?






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Adding a cell reference to an if then function

Look in Excel help for the CONCATENATE function and find the associated
topic "Combine text and numbers".
--
David Biddulph

"Timmah18" wrote in message
...
OMG that worked. I don't understand how it works though, what does the &"
"
& mean and why couldn't I just use the standard cell reference (=E6)?

"T. Valko" wrote:

Do you want the same cell reference to apply to every IF?

Try it like this:

=IF(H4="Like_New","Great condition, may contain minor
wear",IF(H4="Very_Good","Contains considerable wear, still very usable
though",IF(H4="Brand_New","MINT")))&" "&E6


--
Biff
Microsoft Excel MVP


"Timmah18" wrote in message
...
I have the following function:
=IF(H4="Like_New","Great condition, may contain minor
wear",IF(H4="Very_Good","Contains considerable wear, still very usable
though",IF(H4="Brand_New","MINT")))

and after the then statement I need it to read a number from a relative
cell
reference. But when I try to reference a cell inside the function it
only
copies the name of the cell (ex. E6) and won't actually copy the
contents
of
the cell. If I try to reference the cell outside of the function it
doesn't
work and I get a reference error message.

Any ideas?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding to the row digit in the cell reference bobby Excel Discussion (Misc queries) 2 May 30th 07 07:49 PM
adding a formula around a cell reference Greek77 Excel Discussion (Misc queries) 4 May 17th 07 10:32 PM
adding cell reference on a header Sima Excel Worksheet Functions 4 March 29th 07 07:14 PM
Adding number to a cell reference not to the contents Go Buckeyes! Excel Worksheet Functions 1 May 28th 06 08:01 PM
What is the shortcut key for adding $ to a cell reference eg $c$3 Bryce Excel Worksheet Functions 2 September 14th 05 02:30 PM


All times are GMT +1. The time now is 02:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"