Cell gets colored

punit83

Board Regular
Joined
Jan 17, 2018
Messages
66
Office Version
  1. 2019
Platform
  1. Windows
Hello !


i have sheet and in that A we have lotid, is there any formula or code that when i punch bar code gun on that product that specific cell of that Lot id gets colored


Thanks in advanced
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Not really sure what you are trying to do here (...punch bar code gun...?) but Conditional Formatting will change a cell's formatting (color, font etc) based on certain specified rules that you set
 
Upvote 0
I can't see how using a bar code scanner can make a change in the cell to trigger conditional formatting or a macro as it just scans an image and doesn't make any change to a cell.
 
Last edited:
Upvote 0
Oh sorry, maybe i am not able to explain correctly.

Actually what i wanted for example if in search when i type lot id and that lot id if is there in data than that cell can get colored.


Thank you all
 
Upvote 0
Still not sure exactly what you want but if you are searching for an ID in column A and your column has a header then try running the code below...

Code:
Sub findID()
Dim x As String
x = InputBox("Type ID to search")
Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row).Find(x, , xlValues, xlWhole, xlByRows, xlNext, False).Interior.ColorIndex = 6
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,184
Messages
6,123,533
Members
449,106
Latest member
techog

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