Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

New VB6 user


  • Please log in to reply

#1
Robert Dunn

Robert Dunn

    New Member

  • Member
  • Pip
  • 2 posts
I am a new user of excel VB and would be very grateful if
someone could help me with my first excel macro .

Specifications

I have a list of items each with a consecutive item reference number .

Example

REF ITEM
2(cell c 2) cup
3 (c 3) glass
? (c 4) knife

I require a macro as follows for the reference of item "knife"

-Put cursor in cell c4
-Select macro
-Macro takes the item ref above ie 3 and adds 1 =4 in formula form ie =1+c3
-The reference then equals 4
-The rows between the item ref vary but are always blanks.

My Suggestion
I have come up with the following but unfortunately
the item reference loses the formula. ie becomes =4 not =1+c3

ActiveCell.Formula = "= 1+" & Selection.End(xlUp)

Any help would be appreciated to perfect my first macro

best regards
ROBERT DUNN
www.e-ffe.com
[email protected]

Edited by Robert Dunn, 13 July 2005 - 01:54 AM.

  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP