Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Multiple indexs in one cell formula

Sep 3, 2005 10:52PM PDT

I'm trying to do a Invoice thing where it calles information from a database of addresses. The basic way of doing this is

=INDEX(Addresses,$M$1,7)

But is there any way of having more than one index in one cell?

e.g. =INDEX(Addresses,$M$1,7)INDEX(Addresses,$M$1,6)

^^that doesn't work but you get the idea.I've tried putting each index in it's own brackets and putting a comma after each one, but neither methods are successful. Any ideas? btw I use Excel 2002.

Discussion is locked

- Collapse -
(NT) (NT) Sorry, I don't get the idea. Please elaborate.
Sep 4, 2005 12:29AM PDT
- Collapse -
explanation...
Sep 4, 2005 1:12AM PDT

ok. say if you had a database and two of the fields were "title" (like Mr. Mrs.) and "Surname" (like Smith). I wanted a cell on the Invoice to have the name of the person it was going to be sent to (e.g. Mr. Smith). To do that I would need to have 2 index formulas in the same cell. How do you do that?

- Collapse -
Use the string concatenation operator in between.
Sep 4, 2005 5:25AM PDT

It's &.

So "A" & "B" = "AB".
And "Mr." & " " & "Smith" is "Mr. Smith" (note the space, which is a character on its own.

So your formula is something like =index(...) & " " & index (...). Easy enough, once you know it.

It's like: how do I get to sqrt (sqare roots) in a formula. Use the + or - then (that's a numerical operator, used between numbers):
=sqrt(5)-sqrt(5) will be approximately 0.

Hope this helps.


Kees

- Collapse -
(NT) (NT) thank you it works perfectly! :)
Sep 4, 2005 4:17PM PDT
- Collapse -
(NT) (NT) You're welcome.
Sep 4, 2005 5:12PM PDT