Results 1 to 5 of 5

Referencing cell value (number) within a macro

Threaded View

  1. #1
    Registered User
    Join Date
    03-19-2020
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Referencing cell value (number) within a macro

    Hey guys

    I am wondering how i reference a cell value (number) from within a macro.

    I essentially want the number in the cell to populate in the macro;

    macro is here;

    Sub KeywordCombo()
    
    Dim i As Long
    Dim j As Long
    Dim k As Long
    Dim l As Long
    For i = 1 To 26
    For j = 1 To 26
    For k = 1 To 26
    l = l + 1
    Range("D" & l) = Range("A" & i) & "|" & Range("B" & j) & "|" & Range("C" & k)
    Next k
    Next j
    Next i
    
    End Sub

    Where "26" is, I want to reference cell F2, then G2, then H2

    I tried Range(“H2”).Value but that doesn't seem to work.

    Thanks
    Last edited by Pepe Le Mokko; 03-20-2020 at 09:26 AM. Reason: Code tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 05-12-2019, 11:13 AM
  2. Replies: 1
    Last Post: 10-16-2014, 08:08 PM
  3. Referencing cell above, add next sequential number when clicking on blank cell
    By greatwent in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2013, 12:42 PM
  4. Formula referencing a cell using a number of another cell
    By PAUL41EXCEL in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-20-2013, 03:03 AM
  5. [SOLVED] Referencing a cell (range instead of 1 number)
    By zippersweater in forum Excel General
    Replies: 4
    Last Post: 06-08-2012, 12:49 PM
  6. Cell referencing a Row plus a number
    By cmyerscpa in forum Excel General
    Replies: 1
    Last Post: 08-25-2011, 06:03 PM
  7. [SOLVED] Equation Referencing Row Number Stored in Cell
    By Jim Hagan in forum Excel General
    Replies: 1
    Last Post: 04-13-2005, 04:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1