EXCEL VBA

%3CLINGO-SUB%20id%3D%22lingo-sub-3343310%22%20slang%3D%22en-US%22%3EEXCEL%20VBA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3343310%22%20slang%3D%22en-US%22%3E%3CP%3ERespected%20Mr.%20Hans%20Vogelaar%3C%2FP%3E%3CP%3Ea%20while%20ago%20i%20got%20Your%20tips%20today%20and%20i%20used%20them%20in%20my%20excel%20project%2C%20but%20that%20is%20not%20working%20properly.%20That's%20why%20i%20am%20requesting%20in%20that%20matter%20for%20getting%20help%20from%20You.%20if%20there%20is%20any%20mistake%20by%20me%20please%20forgive%20me.%3C%2FP%3E%3CP%3EVBA%20CODE%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESub%20SaveData()%3CBR%20%2F%3EDim%20rng%20As%20Range%3CBR%20%2F%3EDim%20temp%20As%20Variant%3CBR%20%2F%3EDim%20i%20As%20Long%3CBR%20%2F%3EDim%20a%20As%20Long%3CBR%20%2F%3EDim%20rng_dest%20As%20Range%3CBR%20%2F%3EApplication.ScreenUpdating%20%3D%20False%3CBR%20%2F%3Ei%20%3D%201%3CBR%20%2F%3ESet%20rng_dest%20%3D%20Sheets(%22INVOICELIST%22).RangeColumn(%22D%3AT%22)%3CBR%20%2F%3E'%20Find%20first%20empty%20row%20in%20columns%20D%3AT%20on%20sheet%20INVOICELIST%3CBR%20%2F%3EDo%20Until%20WorksheetFunction.CountA(rng_dest.Rows(i))%20%3D%200%3CBR%20%2F%3Ei%20%3D%20i%20%2B%201%3CBR%20%2F%3ELoop%3CBR%20%2F%3E'Copy%20range%20C13%3AC29%20and%20G35%20on%20sheet%20Invoice%20to%20Variant%20array%3CBR%20%2F%3ESet%20rng%20%3D%20Sheets(%22INVOICE%22).Range(%22C13%3AC29%22)%3CBR%20%2F%3ESet%20rng%20%3D%20Sheets(%22INVOICE%22).Range(%22G35%22)%3CBR%20%2F%3E'%20Copy%20rows%20containing%20values%20to%20sheet%20INVOICELIST%20Column%20(D2%3AT2)%20for%20ITEM%3CBR%20%2F%3E'%20Copy%20rows%20containing%20values%20to%20sheet%20INVOICELIST%20Column%20(U2)%20for%20VALUE%3CBR%20%2F%3EFor%20a%20%3D%201%20To%20rng.Rows.Count%3CBR%20%2F%3EIf%20WorksheetFunction.CountA(rng.Rows(a))%20%26lt%3B%26gt%3B%200%20Then%3CBR%20%2F%3Erng_dest.Rows(i).Value%20%3D%20rng.Rows(a).Value%3CBR%20%2F%3E'Copy%20inv%20no%3CBR%20%2F%3ESheets(%22INVOICELIST%22).Range(%22B%22%20%26amp%3B%20i).Value%20%3D%20Sheets(%22INVOICE%22).Range(%22F1%22).Value%3CBR%20%2F%3E'Copy%20Date%3CBR%20%2F%3ESheets(%22INVOICELIST%22).Range(%22A%22%20%26amp%3B%20i).Value%20%3D%20Sheets(%22INVOICE%22).Range(%22F2%22).Value%3CBR%20%2F%3E'Copy%20Company%20Name%3CBR%20%2F%3ESheets(%22INVOICELIST%22).Range(%22C%22%20%26amp%3B%20i).Value%20%3D%20Sheets(%22INVOICE%22).Range(%22D5%22).Value%3C%2FP%3E%3CP%3Ei%20%3D%20i%20%2B%201%3CBR%20%2F%3EEnd%20If%3CBR%20%2F%3ENext%20a%3CBR%20%2F%3EApplication.ScreenUpdating%20%3D%20True%3C%2FP%3E%3CP%3EEnd%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESub%20SaveData()%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20ws%20As%20Worksheet%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20wt%20As%20Worksheet%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Dim%20r%20As%20Long%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Application.ScreenUpdating%20%3D%20False%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20ws%20%3D%20Worksheets(%22INVOICE%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20wt%20%3D%20Worksheets(%22INVOICELIST%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20'%20Find%20first%20empty%20row%20in%20columns%20D%3AU%20on%20sheet%20INVOICELIST%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20r%20%3D%20wt.Range(%22D%3AU%22).Find(What%3A%3D%22*%22%2C%20SearchOrder%3A%3DxlByRows%2C%20SearchDirection%3A%3DxlPrevious).Row%20%2B%201%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20wt.Range(%22D%22%20%26amp%3B%20r).Resize(1%2C%2017).Value%20%3D%20Application.Transpose(ws.Range(%22C13%3AC29%22))%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20wt.Range(%22U%22%20%26amp%3B%20r).Value%20%3D%20ws.Range(%22G35%22).Value%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Application.ScreenUpdating%20%3D%20True%3C%2FP%3E%3CP%3EEnd%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EINVOICELIST%20Sheet%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%222646%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2272%22%3EINVOICE%20NO%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2272%22%3EDATE%3C%2FTD%3E%3CTD%20width%3D%2284%22%3ECONSUMER%20NAME%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2242%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2242%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2242%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2242%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2248%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2248%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2248%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2248%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2248%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2248%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2248%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2248%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2249%22%3EItem%20NAME%3C%2FTD%3E%3CTD%20width%3D%2245%22%3EQTY%3C%2FTD%3E%3CTD%20width%3D%2272%22%3EVALUE%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EINVOICE%20Sheet%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%22691%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2272%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2240%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2276%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22247%22%3EINVOICE%3C%2FTD%3E%3CTD%20width%3D%2291%22%3EInvoice%20%23%3A%3C%2F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%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3344897%22%20slang%3D%22en-US%22%3ERe%3A%20EXCEL%20VBA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3344897%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1383603%22%20target%3D%22_blank%22%3E%40TARUNKANTI1964%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20have%20posted%20this%20question%20in%20three%20different%20discussions%2C%20and%20you%20have%20received%20a%20reply%20in%20the%20two%20others.%3C%2FP%3E%0A%3CP%3EThis%20is%20very%20confusing%2C%20both%20for%20you%20and%20for%20the%20people%20who%20try%20to%20help%20you.%3C%2FP%3E%0A%3CP%3EIn%20the%20future%2C%20please%20don't%20start%20new%20discussions%20for%20the%20same%20question.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Respected Mr. Hans Vogelaar

a while ago i got Your tips today and i used them in my excel project, but that is not working properly. That's why i am requesting in that matter for getting help from You. if there is any mistake by me please forgive me.

VBA CODE:

 

 

Sub SaveData()
Dim rng As Range
Dim temp As Variant
Dim i As Long
Dim a As Long
Dim rng_dest As Range
Application.ScreenUpdating = False
i = 1
Set rng_dest = Sheets("INVOICELIST").RangeColumn("D:T")
' Find first empty row in columns D:T on sheet INVOICELIST
Do Until WorksheetFunction.CountA(rng_dest.Rows(i)) = 0
i = i + 1
Loop
'Copy range C13:C29 and G35 on sheet Invoice to Variant array
Set rng = Sheets("INVOICE").Range("C13:C29")
Set rng = Sheets("INVOICE").Range("G35")
' Copy rows containing values to sheet INVOICELIST Column (D2:T2) for ITEM
' Copy rows containing values to sheet INVOICELIST Column (U2) for VALUE
For a = 1 To rng.Rows.Count
If WorksheetFunction.CountA(rng.Rows(a)) <> 0 Then
rng_dest.Rows(i).Value = rng.Rows(a).Value
'Copy inv no
Sheets("INVOICELIST").Range("B" & i).Value = Sheets("INVOICE").Range("F1").Value
'Copy Date
Sheets("INVOICELIST").Range("A" & i).Value = Sheets("INVOICE").Range("F2").Value
'Copy Company Name
Sheets("INVOICELIST").Range("C" & i).Value = Sheets("INVOICE").Range("D5").Value

i = i + 1
End If
Next a
Application.ScreenUpdating = True

End Sub

 

Sub SaveData()

    Dim ws As Worksheet

    Dim wt As Worksheet

    Dim r As Long

    Application.ScreenUpdating = False

    Set ws = Worksheets("INVOICE")

    Set wt = Worksheets("INVOICELIST")

    ' Find first empty row in columns D:U on sheet INVOICELIST

    r = wt.Range("D:U").Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row + 1

    wt.Range("D" & r).Resize(1, 17).Value = Application.Transpose(ws.Range("C13:C29"))

    wt.Range("U" & r).Value = ws.Range("G35").Value

    Application.ScreenUpdating = True

End Sub

 

INVOICELIST Sheet

 

INVOICE NO DATECONSUMER NAMEItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYItem NAMEQTYVALUE

 

INVOICE Sheet

 

   INVOICEInvoice #:1 
     Invoice Date09-05-2022 
 CUSTOMER: MAYNA    
        
        
        
        
        
        
        
 Sr.No.HSN CODEITEM NAMEQtyUnit PriceTotal Value 
 1 ABCD1011110 
 2 ABCD5511605 
 3      
 4      
 5 EFGH179153 
 6      
 7      
 8      
 9      
 10      
 11      
 12      
 13      
 14      
 15      
 16      
 17      
 18      
 19      
 20      
 21      
 22      
 23      
 24      
 25      
        
    Sub Total  
        
    Tax   
        
    Discount  
        
    Total  

868

1 Reply

@TARUNKANTI1964 

You have posted this question in three different discussions, and you have received a reply in the two others.

This is very confusing, both for you and for the people who try to help you.

In the future, please don't start new discussions for the same question.