Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Kerri Gonzalez   on Sep 20 In MS Office Category.

  
Question Answered By: Gustavo Taylor   on Sep 20

For this part you can use TypeName. It looks like this:

TypeName(sheet1.Cells(2, 1).Value)
OR
TypeName(sheet1.Range("L4").Value)

You can see it like this:
Debug.Print TypeName(sheet1.Cells(2, 1).Value)
Debug.Print TypeName(sheet1.Range("L4").Value)

The TypeName is itself a string and some of the values it can have are:
"Empty" obvious
"String" ASCII Text
"Double" a number

> If it does, switch  the current cell  one row  down.
> I also need to copy  the formula  from the cell as it activates the
next row.

Not sure what you mean here. To reference a nearby cell, there is
the Offset Property. Looks something like this:

ActiveCell.Offset(Row-offset, Column-offset)
ActiveCell.Offset(1, 0).Activate ' Step down one row & Actiate it


Putting these together, here's one solution:


If TypeName(ActiveCell.Value) <> "Empty" Then ' It's not empty
ActiveCell.Offset(1, 0).Activate ' Step down one row & Actiate it
End If

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Cell Status Help Or get search suggestion and latest updates.


Tagged: