VBA Assistance needed
So basically I have trawled a million groups trying to find an answer to my problem but couldn't and so was wonderin if anyone here could assist.
I have 2 spreadsheets called "source" and "input".
"Source" contains rows of data, each one has a unique identifier.
You can input this identifier in to "Input" and it reads "Source" using traditional Index Match codes based on this.
What I want to be able to do is to type a note in to a set box in "Input", reference A1, and then press a VBA button in "Input" that works in reverse by searching "Source" for the unique identifier and then inputting the notes in to a corresponding column, the unique identifier is in column A the Notes are in column H.
I'd like the code to then clear the notes cell.
Can you help?
HELP : Pasting data on the next empty row
Here's my code. I've tried several tips to paste the data on the next empty row but it wont help.
Can someone help me please.
Sub Save()
'
' Save Macro
'
' Keyboard Shortcut: Ctrl+i
'
Range("C2:C4").Select
Selection.Copy
Sheets("Raw").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Sheets("Data Input").Select
Range("I11:I13").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Raw").Select
Range("D2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Sheets("Data Input").Select
Range("K15:K21").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Raw").Select
Range("G2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Range("N2").Select
End Sub
Need help to copy data from one sheet to another
I have the following VBA code and my intention is to copy data from one sheet to another; however, when I run it I end up with row heights being bigger than the original sheet. Why is that?
The second question is, because I'm using clear contents option for the destination sheet, is there a way to not clear some graphs and formulas that I have at the very bottom of the destination sheets when I run my code.
Finally, wondering if there is a better/shorter/cleaner way to rewrite the code below to accomplish same result but again with formatting same as source sheet and with a way not removing graphs/formulas I have at bottom of destination sheet.
thank you!!
Sub copypastecolumndata()
Sheet3.Select
Sheet3.Cells.ClearContents
Range("A1").Value = "Case_ID"
Range("B1").Value = "Customer"
Range("C1").Value = "Category"
Range("D1").Value = "Type_"
Range("E1").Value = "Item"
Range("F1").Value = "Severity"
Range("G1").Value = "Status"
Range("H1").Value = "Submitted_From"
Range("I1").Value = "Create_Time"
Range("J1").Value = "Resolved_Time"
Range("K1").Value = "Summary"
Range("L1").Value = "Work_Summary"
Range("M1").Value = "Action_Taken"
Range("N1").Value = "Machine"
Range("O1").Value = "Met_Resolution_SLA"
Range("P1").Value = "Met_Contact_SLA"
Range("Q1").Value = "SLA_Exempt"
Range("R1").Value = "Assigned_To_Group"
Range("S1").Value = "Assigned_To_Individual"
Range("T1").Value = "Total_Time_Spent"
Sheet2.Select
Dim lastrow As Long
lastrow = Sheet2.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lastrow
If Cells(i, 2) = "AA ACARS" Then
Case_ID = Sheet2.Cells(i, 1)
Customer = Sheet2.Cells(i, 2)
Category = Sheet2.Cells(i, 3)
Type_ = Sheet2.Cells(i, 4)
Item = Sheet2.Cells(i, 5)
Severity = Sheet2.Cells(i, 6)
Status = Sheet2.Cells(i, 7)
Submitted_From = Sheet2.Cells(i, 8)
Create_Time = Sheet2.Cells(i, 9)
Resolved_Time = Sheet2.Cells(i, 10)
Summary = Sheet2.Cells(i, 11)
Work_Summary = Sheet2.Cells(i, 12)
Action_Taken = Sheet2.Cells(i, 13)
Machine = Sheet2.Cells(i, 14)
Met_Resolution_SLA = Sheet2.Cells(i, 15)
Met_Contact_SLA = Sheet2.Cells(i, 16)
SLA_Exempt = Sheet2.Cells(i, 17)
Assigned_To_Group = Sheet2.Cells(i, 18)
Assigned_To_Individual = Sheet2.Cells(i, 19)
Total_Time_Spent = Sheet2.Cells(i, 20)
Sheet2.Activate
erow = Sheet3.Cells(Rows.Count, 1).End(xlUp).Offset(1#).Row
Sheet3.Cells(erow, 1) = Case_ID
Sheet3.Cells(erow, 2) = Customer
Sheet3.Cells(erow, 3) = Category
Sheet3.Cells(erow, 4) = Type_
Sheet3.Cells(erow, 5) = Item
Sheet3.Cells(erow, 6) = Severity
Sheet3.Cells(erow, 7) = Status
Sheet3.Cells(erow, 8) = Submitted_From
Sheet3.Cells(erow, 9) = Create_Time
Sheet3.Cells(erow, 10) = Resolved_Time
Sheet3.Cells(erow, 11) = Summary
Sheet3.Cells(erow, 12) = Work_Summary
Sheet3.Cells(erow, 13) = Action_Taken
Sheet3.Cells(erow, 14) = Machine
Sheet3.Cells(erow, 15) = Met_Resolution_SLA
Sheet3.Cells(erow, 16) = Met_Contact_SLA
Sheet3.Cells(erow, 17) = SLA_Exempt
Sheet3.Cells(erow, 18) = Assigned_To_Group
Sheet3.Cells(erow, 19) = Assigned_To_Individual
Sheet3.Cells(erow, 20) = Total_Time_Spent
Range("A:Z").Columns.AutoFit
Sheet2.Activate
End If
Next i
End Sub
sequence of serial numbers
Hi,
i need help regarding sequence serial number with rang.
below i putted range like this but take from sheet cell the range and then make automatic total sequence serial numbers which we needed.
my range.
23000100
23000101
23000102
23000103
23000104
23000105
23000106
23000107
23000108
23000109
23000110
23000111
23000112
23000113
23000114
23000115
23000200
23000201
23000202
23000203
23000204
23000205
23000206
23000207
23000208
23000209
23000210
23000211
23000212
23000213
23000214
23000215
23000300
23000301
23000302
23000303
23000304
23000305
23000306
23000307
23000308
23000309
23000310
23000311
23000312
23000313
23000314
23000315
23000500
23000501
23000502
23000503
23000504
23000505
23000506
23000507
23000508
23000509
23000510
23000511
23000512
23000513
23000514
23000515
23000600
23000601
23000602
23000603
23000604
23000605
23000606
23000607
23000608
23000609
23000610
23000611
23000612
23000613
23000614
23000615
23000900
23000901
23000902
23000903
23000904
23000905
23000906
23000907
23000908
23000909
23000910
23000911
23000912
23000913
23000914
23000915
23001000
23001001
23001002
23001003
23001004
23001005
23001006
23001007
23001008
23001009
23001010
23001011
23001012
23001013
23001014
23001015
23001100
23001101
23001102
23001103
23001104
23001105
23001106
23001107
23001108
23001109
23001110
23001111
23001112
23001113
23001114
23001115
23001200
23001201
23001202
23001203
23001204
23001205
23001206
23001207
23001208
23001209
23001210
23001211
23001212
23001213
23001214
23001215
23001400
23001401
23001402
23001403
23001404
23001405
23001406
23001407
23001408
23001409
23001410
23001411
23001412
23001413
23001414
23001415
23001500
23001501
23001502
23001503
23001504
23001505
23001506
23001507
23001508
23001509
23001510
23001511
23001512
23001513
23001514
23001515
23010000
23010001
23010002
23010003
23010004
23010005
23010006
23010007
23010008
23010009
23010010
23010011
23010012
23010013
23010014
23010015
23010100
23010101
23010102
23010103
23010104
23010105
23010106
23010107
23010108
23010109
23010110
23010111
23010112
23010113
23010114
23010115
23010200
23010201
23010202
23010203
23010204
23010205
23010206
23010207
23010208
23010209
23010210
23010211
23010212
23010213
23010214
23010215
23010300
23010301
23010302
23010303
23010304
23010305
23010306
23010307
23010308
23010309
23010310
23010311
23010312
23010313
23010314
23010315
23010400
23010401
23010402
23010403
23010404
23010405
23010406
23010407
23010408
23010409
23010410
23010411
23010412
23010413
23010414
23010415
23010500
23010501
23010502
23010503
23010504
23010505
23010506
23010507
23010508
23010509
23010510
23010511
23010512
23010513
23010514
23010515
23010600
23010601
23010602
23010603
23010604
23010605
23010606
23010607
23010608
23010609
23010610
23010611
23010612
23010613
23010614
23010615
23010700
23010701
23010702
23010703
23010704
23010705
23010706
23010707
23010708
23010709
23010710
23010711
23010712
23010713
23010714
23010715
23010800
23010801
23010802
23010803
23010804
23010805
23010806
23010807
23010808
23010809
23010810
23010811
23010812
23010813
23010814
23010815
23010900
23010901
23010902
23010903
23010904
23010905
23010906
23010907
23010908
23010909
23010910
23010911
23010912
23010913
23010914
23010915
23011000
23011001
23011002
23011003
23011004
23011005
23011006
23011007
23011008
23011009
23011010
23011011
23011012
23011013
23011014
23011015
Regards,
abas
data validation-show description based on code in drop down lis
in data validation drop down list, it will show the code but output should store description in the cell...similar to vlookup and indirect function with name range option....pls. help how to get the result send solution mail to pattabi.siva@gmail.com