Lookup Row 3 Column "amz" - Result Side by Side

  • Thread starter Thread starter Steven Ellet
  • Start date Start date
  • Tags Tags
    Data Excel
AI Thread Summary
To look up values from specific columns in Excel and concatenate them side by side, a VBA macro can be utilized. For example, a macro can be created to concatenate values from designated cells, such as using the code snippet provided, which combines values from three consecutive cells into a single output. The discussion also highlights that simply referencing a column like "amz" in Excel lacks meaning; instead, concatenation should be done by referencing specific row and column indices. For users needing to pull data from multiple cells efficiently, structuring data as a database table and using queries is recommended, emphasizing the importance of proper indexing for effective data retrieval.
Steven Ellet
Messages
85
Reaction score
3
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
 
Computer science news on Phys.org
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"
 
Steven Ellet said:
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.
 
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?
 
Steven Ellet said:
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...
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

Replies
9
Views
2K
Replies
1
Views
1K
Replies
6
Views
2K
Replies
14
Views
5K
Replies
1
Views
900
Replies
8
Views
2K
Back
Top