Home > Software design >  Retrieve the value of multiple cells and opening files in Excell
Retrieve the value of multiple cells and opening files in Excell

Time:01-13

I am trying to copy the content of 2 separate cells together with a command to launch the Notepad to open 2 files for visual comparison in Excell 2016 on Windows 10.

e.g. cell [1,A] - C:\Comparison\file1.txt cell [1,B] - C:\Comparison\file2.txt

And would like cell [1,C] to include the following:

"C:\Program Files (x86)\Notepad  \Notepad  .exe" C:\Comparison\file1.txt C:\Comparison\file2.txt

I have tried the line in cell [1,C] below without success:

"C:\Program Files (x86)\Notepad  \Notepad  .exe" = INDIRECT(ADDRESS(1,A)) = INDIRECT(ADDRESS(1,b))

I would also like the ability to run the command in cell [1,C], to launch Notepad and open the 2 files in Excell instead of copy-paste to the Windows Search field before pressing to achieve the same thing.

There are many rows of files that require comparisons.

CodePudding user response:

Cell C1 needs to contain a formula. Something like

="C:\Program Files (x86)\Notepad  \Notepad  .exe "&A1&" "&B1

If A1 and B1 need to be enclosed in quotes then use

="C:\Program Files (x86)\Notepad  \Notepad  .exe """&A1&""" """&B1&""""
  •  Tags:  
  • Related