SEARCHING ANOTHER WORKBOOK FOR CURRENT ACTIVE TEXT OFFSET AND RETURNING TEXT FROM 3 CELLS OFFSET FROM FOUND TEXT

BAKELOVEMORE

New Member
Joined
Apr 2, 2024
Messages
9
Office Version
  1. 365
Platform
  1. Windows
I have 2 workbooks. I use one workbook to track issues that I have input on the other workbook. i.e. on the current workbook, I need to search the second workbook for a value offset by -3 from the current workbooks activecell. I need to take that text value found on the second workbook and insert the text found in the cells offset by 2 and 3 and 4. i.e. The text value offset by -3 of the active cell is Banana. Find Banana in column 3 and insert the concat text from columns 5 , 6, 7.

VBA Code:
=IF(E24="TEXT",CONCAT('[OTHER SHEET.xlsm]Sheet1'!$E$2, "     ", '[OTHER SHEET.xlsm]Sheet1'!$F$2, "     ",'[OTHER SHEET.xlsm]Sheet1'!$G$2))

This works but I would have to use IFS and nest 66 different variables. I have tried using named cells as ranges. And activecell.offset, etc. I would also have to drag this formula down 32 cells. I really would rather have a function that I can just click when I need it because not all lines in my main workbook will need this.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
In the example below, I have H4 highlighted. This is where I want the text from the other file to show. Based on cell D4, I want to search the other file in column C2:C66 for the row containing the same text "FRNKFORD" and CONCAT(E23," ",F23," ",G23) and placing that text in H4.




DO.jpg
SC.jpg
 
Upvote 0
Assuming the last row is 100 ( adjust as needed). Try:
Excel Formula:
=TEXTJOIN(" ",TRUE,FILTER('[OTHER SHEET.xlsm]Sheet1'!$E$2:$G$100,'[OTHER SHEET.xlsm]Sheet1'!$C$2:$C$100 = E4))
 
Upvote 0
Assuming the last row is 100 ( adjust as needed). Try:
Excel Formula:
=TEXTJOIN(" ",TRUE,FILTER('[OTHER SHEET.xlsm]Sheet1'!$E$2:$G$100,'[OTHER SHEET.xlsm]Sheet1'!$C$2:$C$100 = E4))
That works great but I need E$4 to be whatever the active row is. I would rather not have to drag this down the entire project and use it as a macro only when I need to.
 
Upvote 0
How do you imagine the macro would trigger e.g. cell change, click on the cell? What should it use as an indicator to know which row should be applied to?
 
Upvote 0
How do you imagine the macro would trigger? What should it use as an indicator to know which row should be applied to?
I have tried using activecell.offset but I never seem to get the syntax exactly right.
 
Upvote 0
Ok, why don't you just copy and paste the formula into the row that you need it for? I don't see a point of a macro.
 
Upvote 0
Ok, why don't you just copy and paste the formula into the row that you need it for? I don't see a point of a macro.
Time. I need to so things as quickly and efficiently as possible. I work in a train control center and 30 seconds adds up to minutes during a shift. Pasting the formulas is definitely faster than copy/pasting back and forth each cell, but I am also trying to make it as simple as possible for the other users in the office that have no clue about what to do. They understand "Push this button".
 
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,777
Members
449,187
Latest member
hermansoa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top