VBA to PCOM connection - vba

I am trying to get specific numbers from IBM Pcomm to Excel. I want to use the search.text function to do a column offset to retrieve a string of numbers to excel (Say to cell A1) on the same row as the searched text.
Thank you in advance!
I have tried searching through the web without any success.

Related

Search SQL table using excel to return only matching values

I have a large table in my SQL database with a few million rows so I can't just load it into excel. I'd like to setup a data connection in Excel to the database which I can do now, but I want to be able to open the excel sheet, type my search parameter in a cell and then have the matching rows returned from the database table into the excel sheet.
Does anyone know if that's possible? I can't find a way to do it without manually adjusting the search term in the connection properties because I don't know how to pass along what I typed in the cell to be the search term.
Ok figured it out, microsoft has a great guide for it here:
https://support.microsoft.com/en-us/office/create-a-parameter-query-in-microsoft-query-c67d9af7-c8a0-4bf7-937c-087cb25f7ad3

EXCEL VBA Search for values between 2 numbers and Store search results in an array?

EXCEL VBA Store search results in an array?
The above link is similar to what I am after, however, I wanted to know if it's possible to search for say cells with numbers between 0.5 and 1.5?
Any help is greatly appreciated.

Excel using Index for large number of rows

=INDEX(Analysis!F2:F99999, SMALL(IF($B$1=Analysis!$A$2:$A$99999,ROW(Analysis!A2:$A$99999)-ROW(Analysis!A2)+1),ROW(1:1)))
I am trying to use the formula above to find all rows with a specific phone number. The formula then returns the record specified to he sheet. This formula will not work with sheets that contain a lot of data does anyone know why and how can I fix the issue?

Make a List of numbers formatted with commas from multiple cells to one cell

For starters I have limited experience with VBA and was hoping to accomplish this task with built in excel functions, unfortunately without success. Here is the problem:
I have multiple cells with number values in them (lets say 3 cells each with a value of 1000) and I need that converted to one cell with those same multiple values (on top of each other like a list) and be able to have them formatted with commas at thousands places.
I have been successful at putting them in one cell by using an ampersand and the char(10) function along with formatting to wrap text.
However, now I cannot format with commas. Can this be done without VBA? If not some direction for writing a function would be helpful.
Without VBA
=TEXT(A1,"#,##0")&CHAR(10)&TEXT(B1,"#,##0")&CHAR(10)&TEXT(C1,"#,##0")
For example:

How to find the average of cells in a column when my serial number is odd or even in Excel 2007

Iam trying to find the average of by data in Column B when my serial number in Column A is an even number in excel 2007. iam trying to use the formula =AVERAGEIF(A7:A1500,MOD(A7,2)=0,B7:B1500) but an error is shown as "#DIV/0!". I think there is a problem in specifying MOD function. Can some one help please.
Try following formulas:
=SUMPRODUCT((EVEN(A7:A1500)=A7:A1500)*1,B7:B1500)/SUMPRODUCT((EVEN(A7:A1500)=A7:A1500)*1)
or
=SUMPRODUCT((MOD(A7:A1500,2)=0)*1,B7:B1500)/SUMPRODUCT((MOD(A7:A1500,2)=0)*1)
Try =IF(MOD(A7,2)=0,AVERAGE(B7:B1500),0)