Forum Discussion
Get all references from other cells to a specific cell
Thank you for your replay.
I think the VBA code itself is not so relevant. In addition it is company internal use.
My post is more like a basic question, if possible, and if yes, how?
Anyway for better understanding a summary:
I do have within 1 excel-file 3 sheets with slightly different content. They are all forms. Now we want to make the input easier for the user so the user does not always have to copy,paste information.
Lets say
In Sheet 1:
The user can insert in B2 - D30 different text/information/values (e.g. his name, company, telephone, amount of pieces, costs, etc...). In between there are explanations written down, the user can not change.
In Sheet 2:
There are about 20 cells with reference, e.g.
B2=Sheet1!B2
D10=Sheet1!C5
C70=Sheet1!B16
...
In Sheet 3:
There are about 10 cells with references, e.g.
B3=Sheet1!B4
B9=Sheet1!D5
F1=Sheet1!C17
...
The mapping can be 1:1 or 1:n.
The main task is, that for each of the referenced values within Sheet 2+3 the makro should also be run to do the work after the user inserts/changes values within Sheet1.
(Please do not hang on this code. It is only an example and not the real code. But the concept is identical.) Within the general/comprehensive Workbook-Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Len(Target.Value) > 5 Then
Target.WrapText = True
End If
End Sub
Now i do not want to create a makro program to check for each individual cell everytime. I want a general code that tells me which cell in Sheet2+3 is referencing to 1 specific cell in Sheet1.
I hope the task is now clear. Please let me know what you do think about this.
- Rajesh_SinhaOct 14, 2020Iron ContributorYou have mentioned that "They are all forms". I guess that you are talking about the User Forms for data entry !!
If yes then data entry through User Form needs VBA code,,, since you are already using then unless you will not share existing VBA macro code with me/us,,, how could I and others suggest that where you want to improve it !!- Christof_20Oct 14, 2020Copper Contributor
No Rajesh, i am sorry, but "Forms" was my description/translation for "excelsheet for the user", means no user-forms in VBA.