Highlight referenced cell form other sheets in the same workbook

Rofsal

New Member
Joined
Aug 3, 2020
Messages
10
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi all!

I need to highlight a cell form sheet 2 that is referenced in sheet 1 (See images attached)

What I have in Sheet1 is information referenced to sheet2:
1596469560724.png

And in Sheet2 I have some information
1596469586774.png

What I'm looking for is a formula that highlights in shet2 all the cells that are being referenced to sheet1 like this:

1596469802610.png


I apreciate your time and help!

Rof
 
Which row is that? 13 or 36 maybe? Will it change depending on where the word TOTAL happens to be?
From row 13 to 29, it will change depending on the concepts, probably in other project there will be a pool and another row will have to be inserted
But the colum D will give me the final values, some times the references will be right on the D column, and some other times the D column will be the sum from column H and K that will be referenced from sheet2

Which values on Sheet2 do you want highlighted? Anything in the F:K columns that are found in Sheet1, row 13? In this example, I couldn't find any matches. If there just didn't happen to be any in this example, try to manually create one.

I'm looking to highlight all references in sheet1 from Sheet2, like:
=Sheet2!G224*0.8
=Sheet2!G279
=Sheet2!I285
=Sheet2!G384*0.9


and all those cells in Sheet2 should be highlighted

Some times I work with 5 to 7 proposals and I if leave one without reference it could be a very expensive mistake

I've tried conditional formats and some VBA codes but I haven't succed

thank you for the help!
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
So you're looking for the cell reference, not the cell value? That's a bit trickier, but you can try:

Book3
BCDEFGHIJK
276HOTEL0
2779.34VENTANA DE ALUMINIO V-01 AK-0500(1.50X1.50M) 1 FIJO PZA883297.892902147043.546198324665.63410575
2789.35VENTANA DE ALUMINIO V-02 AK-0500(1.50X1.50M) 1 FIJO PZA142198.5930780.35722.8580119.94665.6365318.8
279320994699951475894
280
28110.1CarpinteríaEmpresa 1Empresa 2Empresa 3
282#CONCEPTOUNIDADCANTIDAD$ UnitarioTotal$ UnitarioTotal$ UnitarioTotal
283SOTANOS
28410.11Cocinas completas, incluye estufa, iluminación bajo alacena, lavabo, grifería, herrajes y jaladerasPza000
2856419891399903951789
286
28710.2CarpinteríaEmpresa 1Empresa 2Empresa 3
288#CONCEPTOUNIDADCANTIDAD$ UnitarioTotal$ UnitarioTotal$ UnitarioTotal
289HOTEL
29010.12PUERTA P-01 07001 PUERTA TIPO TAMBOR ABATIBLE (1.20X2.4M) PZA3949528485168355050536354.5109063
29110.13PUERTA P-02 07001 PUERTA TIPO TAMBOR ABATIBLE (1.00X2.4M) PZA69495569701850011100036196.9217182
29210.14PUERTA P-02A 07001 PUERTA TIPO TAMBOR ABATIBLE (1.00X2.4M)PZA1140731407339000390005249552495
29310.15PUERTA P-03 07001 PUERTA TIPO TAMBOR ABATIBLE (0.78X2.4M) PZA194959495169001690034962.334962.3
29410.16LAMBRIN ML-01 07002 CON UN DESARROLLO DE 1.31+4.93+0.64+0.51M 3.30M DE ALTURA A BASE DE MURO LAMBRIN SOBRE BASTIDOR PZA16625966259109323109323236061236061
29510.17LAMBRIN CON UN DESARROLLO DE 5.38M 3.63M DE ALTURA INCLUYE INSERTO PARA PUERTAPZA15306353063975469754662394.862394.8
29610.18LAMBRIN CON UN DESARROLLO DE 5.17M 3.00M DE ALTURA INCLUYE INSERTO PARA PUERTA PZA14214142141534505345049845.349845.3
29710.19LAMBRIN ML-04 07002 CON UN DESARROLLO DE 4.93M 3.00M DE ALTURA INCLUYE INSERTO PARA PUERTA A BASE DE MURO LAMBRIN PZA14018440184499334993346065.546065.5
29810.2PUERTA P-04 07001 PUERTA TIPO TAMBOR ABATIBLE (0.90X2.4M) PZA96949591152017300166080036125.33468033
29910.21PUERTA P-05 07001 PUERTA TIPO TAMBOR ABATIBLE (0.80X2.4M) PZA84949579758016900141960035662.32995631
30010.22MUEBLE M-01 07003 0.52X0.90X0.20M CUBIERTA PARA LAVABO A BASE DE ESTRUCTURA DE PTR DE 1 X 2'' PZA8411009240016501386007173.22602551
30110.23MUEBLE M-02 07003 1.85X0.54X0.85 ESCRITORIO SEGÚN DISEÑO A BASE DE BASTIDOR DE MADERA DE 1" CUBIERTO POR AMBAS CARAS CON HOJA DE MDF DE 6 MM CON CHAPA DE MADERA NATURAL NOGALPZA845064425376595049980013069.51097840
30210.24MUEBLE M-03 07003 CLOSET 0.90X0.60X2.79M FABRICADO CON REPISA Y BASE CON BASTIDOR DE MADERA, FORRADO POR AMBAS CARAS CON UNA HOJA DE MDF CON CHAPA MADERA NATURAL NOGALPZA84102008568008300697200180281514351
30310.25MURO A BASE DE DUELA DE TZALAM DE 10CMX90CMX19 MM DE ESPESOR, EN TONALIDAD CAFÉ, VETADO SUAVE, ACABADO NATURAL, M229.4275480967.6375611042613135.3386179
304CENTRO COMERCIAL
30510.18000
306347531464539861.2E+07
Sheet2
Cell Formulas
RangeFormula
G277:G278G277=SUM(E277*F277)
G279,K279,I279G279=SUM(G242:G278)
K290:K303,I290:I303,G290:G303,K276:K278,I277:I278I277=SUM($E277*H277)
G284,K284,I284G284=SUM($E$284*F284)
G285,K285,I285G285=SUM(G237:G284)
G305,K305,I305G305=SUM($E$305*F305)
G306G306=SUM(G289:G305)
I306,K306I306=SUM(I283:I305)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B276:K306Expression=SUMPRODUCT(--ISNUMBER(SEARCH(SUBSTITUTE(CELL("address",B276),"$",""),FORMULATEXT(Sheet1!$D$13:$K$40))))textNO


I manually changed one of the values on Sheet1 to reference F278, and you can see it's shaded green. As always with CF, I selected the range B276:K306, and the B276 in the formula refers to that upper left corner. The Sheet1!$D$13:$K$40 range in the formula refers to the range on Sheet1 where we look for the reference.

But there are several issues with this formula. It only finds references like =Sheet2!F278*.05 , but it won't find =Sheet2!$F$278*.05. No dollar signs. Also, the CELL function can be a bit dicey. Finally, it would also highlight F278 if it saw this formula: =F278*.05, without the sheet name. These can be addressed if you want, but you might be better off with a macro.
 
Upvote 0
So you're looking for the cell reference, not the cell value? That's a bit trickier, but you can try:

Yes!!! that's exactly why it's being so complicated, because I havent found a formula in excel that address the reference


But there are several issues with this formula. It only finds references like =Sheet2!F278*.05 , but it won't find =Sheet2!$F$278*.05. No dollar signs.

And many times I have to lock the cells


These can be addressed if you want, but you might be better off with a macro.

I'm totally open, the problem is that I'm not so good with VBA, I'll apreciate all the help

Again Thank You so much for your time and patience
 
Upvote 0
I haven't heard if you've tried the CF rule from post 12 yet, or how it's worked. As an alternative, here's a simple macro that might help.

Open a copy of your workbook. Press Alt-F11 to open the VBA editor. Press Alt-IM to Insert a Module. Paste the following code into the window that opens:

VBA Code:
Sub FindDependents()
Dim c As Range

    ActiveSheet.ClearArrows
    For Each c In ActiveSheet.UsedRange
        c.ShowDependents
    Next c
    
End Sub

Press Alt-Q to close the editor. Go to your Sheet2. Press Alt-F8 to open the macro selector. Choose FindDependents and click Run. Instead of highlighting, you'll see arrows coming from every cell that is used in a formula. Cells referenced on a different sheet point to a little picture of a sheet. So if you have a cell you think should be referenced, and it doesn't have an arrow, you know you need to check it. You can do this manually, just by selecting each cell, and from the Formula tab click the Trace Dependents button. It just depends on how many cells you need to do it to.
 
Upvote 0
Hi Eric!!

Thank you for following up!!!
I've tried the CF but didn't have any luck with mya actual file, let try this VBA and I'll get back to you, I hope tomorrow, today is a busy day!

Saludos!

Rodolfo
 
Upvote 0
Hi Eric!

I tried the macro and it made my excel crahs, at first it was just show the arrows with dependences but then it crashed
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,690
Members
449,117
Latest member
Aaagu

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