• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

Change from number range to regular/alphabetical range

Cells(5, count).code

Open in new window


Hi,

I have the above being used in a function's loop. However, I have another function which uses 'alphabetical numer' (or not sure how to call this)

Eg:

If above points to A5:E2 (at a given point within loop)

I only want to extract the "E2" part to be sent to another function which is called by

Call ExampleFunction("E2")

Open in new window


I tried online search and searching here but I do not know what exactly to search.

Any help is appreciated!

Thanks!
0
Shanan212
Asked:
Shanan212
2 Solutions
 
NorieVBA ExpertCommented:
Cells(5, count) is only one cell and it points to a cell in row 5 of column count.

You can get it's address using it's address property Cells(5, count).Address.

Have you considered changing the data type of the argument passed to the function?

If it was Range then you could pass either Range("E2") and Cells(2, 5).

Or you could just pass Cells(2,5).Address.
0
 
kgerbChief EngineerCommented:
You could do something like this I suppose.

Call ExampleFunction(Chr(64 + Count) & "2")

Kyle
0
 
Shanan212Author Commented:
Both answers are very helpful!

Thank you both!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now