+ Reply to Thread
Results 1 to 3 of 3

Macro to identify cells with info, decode the same and create new table.

  1. #1
    Registered User
    Join Date
    08-24-2015
    Location
    Boston, USA
    MS-Off Ver
    MA
    Posts
    12

    Macro to identify cells with info, decode the same and create new table.

    Hello,

    Here's what's up: I got a plan view of a bridge. I'm trying to write down the different problems I've inspected on it in a cell that has an x and y relevant to the bridge's legend.

    Say I have:
    y=(columns)= 1 to 12
    x=(rows)= 1 to 10
    then a cell inside of it would have the info based on #1 (#2) which decodes into #1=type of deficiency (Say 1=Weld Crack, 2=Existing Weld Crack) and #2 = number of the same type of deficiencies.

    I would like to have a macro that goes through each one of the columns/rows in this map-matrix, and if a cell has an info, reads it and paste the equivalent info on a side table... so, say a cell has 1 (2)... it writes on the table next to it, col(1)=panel "P"X,Y (equivalent to the matrix), col(2)=No. of the same deficiencies or #2 above; col(3) Deficiency - macro reads 1 in table and writes: "Weld Crack"

    Is it possible? Or would you actually suggest a better system to automatize this process?
    Thanks!
    Ana

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Macro to identify cells with info, decode the same and create new table.

    Can you post a workbook showing some sample data please? I think I know what you mean but ideally if you can post something with some data in and a copy of the table you'd like output then it'll be a lot easier to get the right results.
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    08-24-2015
    Location
    Boston, USA
    MS-Off Ver
    MA
    Posts
    12

    Re: Macro to identify cells with info, decode the same and create new table.

    list.PNG

    Here's what I've come up so far... but its still not working:



    i = 1
    j = 1
    For i = 1 To 12
    For j = 1 To 12
    Cells(j, i).Select
    If Cells(j, i).Value <> "" Then
    cx = i
    cy = j
    Range("Q2").Select
    Do While ActiveCell <> ""
    ActiveCell.Offset(1, 0).Select
    Loop
    ActiveCell.Value = cx
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = cy
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Formula = "=Indirect(cells(j,i))"
    End If
    Next
    Next

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 7
    Last Post: 03-04-2014, 05:53 PM
  2. [SOLVED] Need to identify each row in table where 3 cells meet expected criteria
    By ewfnsrq in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-22-2012, 08:30 AM
  3. Macro to filter info and create PDF
    By macro_dummy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2010, 11:07 AM
  4. Replies: 1
    Last Post: 11-25-2010, 02:56 PM
  5. Replies: 3
    Last Post: 04-15-2009, 11:50 PM
  6. Can I create a macro to identify and delete blank rows in a range?
    By carlsondj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-09-2005, 08:05 PM
  7. [SOLVED] How do I create formula to identify duplicate cells?
    By Kelly Lacey in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2005, 02:06 PM
  8. [SOLVED] Decode MP3 ID3v2 and WMA tag info
    By Tom D in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-18-2005, 10:06 AM

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