hello
I have data in sheet main for some customers so what I want match the names are existed in sheet orginal with sheet main then bring all of data for each name . so I put the result in sheet RESULT and see the sheet orginal how data was
thanks
hello
I have data in sheet main for some customers so what I want match the names are existed in sheet orginal with sheet main then bring all of data for each name . so I put the result in sheet RESULT and see the sheet orginal how data was
thanks
for more explenation . it should show result in sheet orginal , but I put the result in sheet result to understand how the data were before
so it should match the names in sheet MAIN in col B with sheet ORGINAL with COL C then should brings all of data for each name .
if any thing is missed please tell me .
any help I truly appreciate .
According to your attachment a good enough readers only VBA demonstration for starters to paste to the ORGINAL worksheet module :
PHP Code:
Sub Demo1()
Dim F&, N$, V, R&, L&, S$
F = 1
UsedRange.Clear
Application.ScreenUpdating = False
With Sheets("MAIN").[A1].CurrentRegion
.Columns(2).AdvancedFilter 2, , .Range("K1"), True
N = .Range("G2").NumberFormat
V = .Range("K1").CurrentRegion.Value2
For R = 2 To UBound(V)
.Range("K2").Value2 = V(R, 1)
.AdvancedFilter 2, .Range("K1:K2"), Cells(F, 1)
L = Cells(F, 1).End(xlDown).Row + 1
Rows(L).Range("F1:H1").NumberFormat = N
S = "=SUM(R[" & F + 1 - L & "]C:R[-1]C)"
Rows(L).Range("E1:H1").HorizontalAlignment = xlCenter
Rows(L).Range("E1:I1").Font.Size = 13
Rows(L).Range("E1:I1").FormulaR1C1 = Array("Total", S, S, "=RC[-2]-RC[-1]", "Balance")
F = L + 3
Next
.Range("K1").CurrentRegion.Clear
End With
Application.ScreenUpdating = True
End Sub
► Do you like it ? ► ► So thanks to click on bottom left star icon « ★ Add Reputation » ! ◄ ◄
thank for your trying , but unfortunately this is not what I want. see what I got after run the code
![]()
Please Login or Register to view this content.
Last edited by jindon; 07-20-2021 at 10:19 AM. Reason: missed heading for balance.
@Jindon it's very awesome ! just I ask about the formula . is there any way after calculate the values hide the formulas just show as a value . the formulas are existed in col B,C,D,H
Try add one line in bold
![]()
Please Login or Register to view this content.
@jindon fantastic ! thanks so much for your excellent code![]()
Apologies...My code resulted in initial result as per first sample file Result Sheet
Last edited by Sintek; 07-20-2021 at 09:58 AM.
Good Luck...
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
Also....Add a comment if you like!!!!
And remember...Mark Thread as Solved...
Excel Forum Rocks!!!
ABDELFATTA
Just edited the code in #5 and you will see ITEM in col.A.
@sintek well don ! but I no know if you note the code delet theses cells above for each name (NAME,DEBIT,CREDIT)
and the name should fill
@Jindon I forgot mentioned the name should fill , sorry I don't mentioned that in my original post
I'm talking about above for each customer .it contains total for debit,credit, balance if you note see there is name . it should fill
Last edited by ABDELFATTA; 07-20-2021 at 10:13 AM.
As I mentioned...I thought you wanted the result as per Sheets("result") in your first upload...
Untitled.png
Code in #5 has been updated.
@sintek please scroll the arrow you will see all the data
@jindon the highlighted cell should fill the name . I admit this my mistake
may yo see the attached file ,please?
@jindon thanks so much
it works perfectly
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks