VBA cell value as an address

Lord of cells

New Member
Joined
Feb 13, 2023
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
Hi,
I need little bit help. I have inventory list which contains about 300 parts, there are just 3 columns PN, Name and PCS.
I want to do VBA code where I can add or remove stock. It have to be very simple so when you write right PN number it gives you name, stock and cell address.

How I can use that cell address (F9 in picture) to add value from PCS + Available ?

Thanks!
 

Attachments

  • Capture.JPG
    Capture.JPG
    68.7 KB · Views: 10

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Welcome to the forum. Why not use the PN number to find the correct row rather than trying to reinterpret the cells address. you can use index, match or a more sophisticated way of doing an index match using the VBa object of a dictionary, which is worth it if you have thousands of rows but for 300, I would think index match will be fast enough.
If you really want to use the text in the cell you can do it using this code
VBA Code:
Dim rng As Range
tt = Range("N10")
Set rng = Range(tt)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,260
Messages
6,123,926
Members
449,135
Latest member
NickWBA

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