• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

Demo Macro Script v2

EE Pros,

Ssaqibh wrote a very nice Macro for me to help with a set of Demos I'm running in a WB.

The challenge is two fold; 1.) I have difficulty working with the RC format and would appreciate the use of a simpler coding that I can deal with and more importantly, 2.) the Macro uses a Matching formula.  You will see on the Demo Tab that there are "Reference Cells".  It's those reference cells that need to indicate where the data must go in each Demo selection.

Thank you in advance,

B.
Demo-Scriptv1.xlsm
0
Bright01
Asked:
Bright01
  • 3
  • 2
1 Solution
 
Saqib Husain, SyedEngineerCommented:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = Range("d3").Address Then
        Set dc = Range("6:6").Find(Target.Value)
        For Each cel In Range("D8:D13")
            ws = Mid(cel, 2, InStr(cel, "!") - 2)
            Rng = Right(cel, Len(cel) - InStr(cel, "!"))
            Sheets(ws).Range(Rng).Value = Intersect(cel.EntireRow, dc.EntireColumn).Value
        Next cel
    End If
End Sub
0
 
Bright01Author Commented:
Ssaqibh,

Nice work!  When I go to scale this, is it just simply increasing the Range from ("D8:" to D??? with the right Reference Cells?

B.
0
 
Saqib Husain, SyedEngineerCommented:
Yes, and I forgot to mention that the third entry in that range should be corrected before using the macro. That one started with == instead of =
0
 
Bright01Author Commented:
yeah....caught that.  I'll continue to build on this.  

Thank you for your help.  I see you're #5 on the Experts!  Congrats!

B.
0
 
Bright01Author Commented:
Works well!  I can use this.

Thank you!

B.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now