Seaching Column C changing multiple values in column E

Halbertzinser

New Member
Joined
May 9, 2017
Messages
1
Hi!

I am currently working on a spreadsheet and need some help! I have column C that lists equipment name, D that has hours ran, and E that has the rate of those hours. Some of my rates are off and I was wondering if there was anyway I could search Column C of a specific equipment name and change column E so the rates are the same for the same equipment.

Any help is appreciated. TIA
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Try this script:
Code:
Sub Check_Rates()
Application.ScreenUpdating = False
'Modified 5-9-17 11:05 AM EDT
Dim i As Long
Dim Lastrow As Long
Dim ans As String
Dim Rate As Long
ans = InputBox("Enter Equipment Name")
Rate = InputBox("Enter Rate amount for " & ans)
Lastrow = Cells(Rows.Count, "C").End(xlUp).Row
    For i = 2 To Lastrow
        If Cells(i, "C").Value = ans Then Cells(i, "E").Value = Rate
    Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
If you want to enter a dollar value for the rate use this script:
enter value like this: 5.65
Code:
Sub Check_Rates()
Application.ScreenUpdating = False
'Modified 5-9-17 11:34 AM EDT
Dim i As Long
Dim Lastrow As Long
Dim ans As String
Dim Rate As String
ans = InputBox("Enter Equipment Name")
Rate = InputBox("Enter Rate amount for " & ans)
Lastrow = Cells(Rows.Count, "C").End(xlUp).Row
    For i = 2 To Lastrow
        If Cells(i, "C").Value = ans Then Cells(i, "E").Value = Format(Rate, "$.00")
    Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Halbertzinser,

Welcome to the MrExcel forum.

We may be able to solve your request without looping thru the rows in your worksheet.


We would like more information. Please see the Forum Use Guidelines in the following link:

http://www.mrexcel.com/forum/board-announcements/127080-guidelines-forum-use.html


See reply #2 at the next link, if you want to show small screenshots, of the raw data, and, what the results should look like.

http://www.mrexcel.com/forum/about-board/508133-attachments.html#post2507729


If you are not able to provide screenshots, then:

You can post your workbook/worksheets to the following free site (sensitive data changed), mark the workbook for sharing, and, provide us with a link to your workbook:

https://dropbox.com
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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
Back
Top