Blog Post

Excel
1 MIN READ

formula to Check if cell value matches with Dynamic Row Number.

mwaterman14's avatar
mwaterman14
Copper Contributor
Aug 07, 2024
I have Two Data Sheets"Sheet 1 (Raw Departures)" and "Sheet 2 (Raw Arrivals)"  
          
Sheet 1 (Raw Departures) Sheet 2 (Raw Arrivals)     
          
GuestSite# Guest NameSite# Match Site Row #. Sheet 1  
Rrookie, Dan3 Bell, Michael Steven74 n/a   
Criss, Leon5 Brown, Beth18 n/a   
David, Clyde129 Brown, Greg64 n/a   
Evant, Tim64 Celino, Darrell153 n/a   
Smith, Jack63 Cordova, Edgar124 n/a   
Ham, Steve151 Land, Danica37 20Site Does not Match  
Hakins, Sam39 David, Clyde129 13Matched Site#  
Hookins, Shilo18 Davis, Tina107 n/a   
Kesslerl, Mikdew131 Evant, Tim121 14Matched Site#  
Land, Danica133 Hookins, Shilo18 18Matched Site#  
          
Using a Match() formula I have detected that "David, Clyde     
s in both sheets and the site number on Sheet 1 is in row 13.    
          
I now need to know if the site number is the same for both sheets;   
 if "True" populate G12 with "Extended Stay"    
 IF "FALSE" populate G12 with " Moved to New Site"   
          
How can I dynamically change the row # in a formula?      
Something like        
 "= If("Sheet 1" Column B, row# (based on G"X","Extended Stay","Moved to New Site""
 I need to change the row# based on the Row found in the Match()  
          
Any help is appreciated.        
Updated Mar 16, 2024
Version 3.0