Finding last used cell in a Range and ADD form values into the Worksheet

ragav

New Member
Joined
Feb 13, 2018
Messages
1
Hello guys,

Need some help here. I have a form and I need my code to update the form values into a specific range (M55:Q65) in my worksheet.

RnoMNOP
52End of Booking Data
53
54
55eDM NameTot sendsUniq ORUniq CTR
56Need the data to updated 4rm this line


57
58
59
60
61
62
63
64
65
66
67
68
69
70End of eDM Data
71But Data is getting updated here

<tbody>
</tbody>


view


view


Code:
Private Sub add_edm_data_Click()

Dim sht, cmp_dash As Worksheet
Dim find_row_eDM, find_col_camp, edm_upd_row_no As Integer

Set sht = ThisWorkbook.Worksheets("Campaign Results Data")
Set cmp_dash = ThisWorkbook.Worksheets("Campaign Dashboard")

find_col_camp = sht.Cells.Find(What:=camp_results.camp_name.Caption, After:=[A1], SearchOrder:=xlByColumns, SearchDirection:=xlNext).Column
find_row_eDM = sht.Cells.Find(What:="eDM Name", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlNext).Row

sht.Activate
Set eDM_range = sht.Range(Cells(find_row_eDM, find_col_camp), Cells(find_row_eDM + 10, find_col_camp + 4))
edm_upd_row_no = eDM_range.End(xlDown).Row


'Update eDM Values

sht.Cells(edm_upd_row_no + 1, find_col_camp).Value = edm_name.Value
sht.Cells(edm_upd_row_no + 1, find_col_camp + 1).Value = tot_sends.Value
sht.Cells(edm_upd_row_no + 1, find_col_camp + 2).Value = Format(uq_OR.Value, "%")
sht.Cells(edm_upd_row_no + 1, find_col_camp + 3).Value = Format(uq_CTR.Value, "%")

cmp_dash.Activate

End Sub

But the data gets updated from row 71. I believe I am doing something wrong. Could someone plz guide me?

Thanks
Ragav.
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Watch MrExcel Video

Forum statistics

Threads
1,123,452
Messages
5,601,748
Members
414,471
Latest member
cchunyadi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top