Excel data return

  • #1
If I want to lookup row 3 column "amz" and the end result will be side by side, how do i do that Example: a=.4 m=.91 z=.22
input; amz
output: .4.91.22
 

Answers and Replies

  • #2
phinds
Science Advisor
Insights Author
Gold Member
16,647
7,212
Don't know how you would do it in Excel formulas but here's how you do it in VBA (as an example)

I've put the kind of strings you show into 3 consecutive cells:
string1.JPG


Then created a VBA macro:
Code:
Sub string1()
  Dim a As String
  a = Cells(2, 4)
  MsgBox Cells(2, 4) & Cells(2, 5) & Cells(2, 6)
End Sub
and the result is ".1.2.3"
 
  • #3
Svein
Science Advisor
Insights Author
2,125
679
If I want to lookup row 3 column "amz" and the end result will be side by side, how do i do that Example: a=.4 m=.91 z=.22
input; amz
"Column amz" is meaningless in Excel. The only thing I can think of that has any meaning is (R3,Ca)&(R3,Cm)&(R3,Cz) In these expressions R=row, C=column and "&" means "concatenation" (strings joined together). Post #2 gives a hint as to how to do the concatenation, but parsing the "amz" part is tricky.
 
  • #4
Well if what I was hoping for won't work then how can I quickly pull data from multiple cells, even if I have a lot of data to pull?
 
  • #5
Svein
Science Advisor
Insights Author
2,125
679
Well if what I was hoping for won't work then how can I quickly pull data from multiple cells, even if I have a lot of data to pull?
One way: Structure your data as a database table and do queries. The trick lies in indexing the data...
 

Related Threads on Excel data return

  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
7
Views
27K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
9
Views
3K
Top