Activitystart dateend dateStatus1KPI's for supply chain3/3/20113/15/2011Completed2Budget 20113/2/20113/22/2011Pending3schedule for branches3/12/20113/15/2011Pending
Hi Ron
Welcome to VBAX
You can post a sample workbook using Manage Attachments in the Go Advanced reply section. Can you show sample data and the desired result?
Regards
MD
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
Without a macro, in E2 enter
=IF(ISNA(VLOOKUP($B2,INDIRECT("'" & E$1 & "'!$B:$E"),4,0)),"",VLOOKUP($B2,INDIRECT("'" & E$1 & "'!$B:$E"),4,0))
copy across and down
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
I still have one problem, in masterfile the formula works under column E, F and G..thats awesome!! ...unfortunately doesnt meet my requirement
For example :- I have added a field under RON, but I dont see anything under masterfile, Its blank.
I want the field
3prepare roq3/2/20113/22/2011Pending
(entered under the tab Ron)
which I have entered under Ron..to be automatically updated in masterfile. unfortunately its blank.. I have updated the spreadhseet with the recent formula..hope this explaination helps!
For something like this to work, you need consistent activity names between the master sheet and all other sheets. This is best done by maintaining one activity list and using data validation to allow only those values to be entered. This would apply to Macros or Formulae.
With regard to Dates, I don't see how you can return conflicting dates from 3 sheets.
I think you should plan further the best way to insert new data and update existing.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
Either you need to hard code your sheet names or otherwise organise/distinguish them so that Name sheets can be counted. This assumes Name Sheets follow the Master sheet and there is a final "extra sheet" as per your example. BTW, If you got your code at another site, please give a link to that location, and a link there to this thread.
[VBA]Private Sub Worksheet_Activate()
Dim Wsht As Variant
Dim Rng As Range, Dn As Range, n As Long
Dim Sh As Integer
Dim Col As Integer
Dim Shts As Long
Dim i As Long
For i = 2 To Shts
Ray(1, 3 + i) = Sheets(i).Name
Next
n = 1
With CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
For Sh = 2 To Shts
With Sheets(Sh)
Set Rng = .Range(.Range("B2"), .Range("B" & Rows.Count).End(xlUp))
End With
For Each Dn In Rng
If Not .Exists(Dn.Value) Then
n = n + 1
.Add Dn.Value, n
Ray(n, 1) = n - 1
Ray(n, 2) = Dn
Ray(n, 3) = Dn(, 2)
Ray(n, 4) = Dn(, 3)
Ray(n, Sh + 3) = Dn(, 4)
Else
Ray(.Item(Dn.Value), Sh + 3) = Dn(, 4)
End If
Next Dn
Next Sh
End With
With Sheets("Master File")
.Range("A1").Resize(n, 4 + Shts) = Ray
End With
End Sub[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.