+ Reply to Thread
Results 1 to 10 of 10

Problem in getting complete recipe/ Comprehensive recipe

Hybrid View

brandedadnan Problem in getting complete... 05-20-2015, 04:15 AM
apo Re: Problem in getting... 05-20-2015, 05:20 AM
brandedadnan Re: Problem in getting... 05-20-2015, 05:38 AM
apo Re: Problem in getting... 05-20-2015, 07:00 AM
brandedadnan Re: Problem in getting... 05-20-2015, 07:25 AM
brandedadnan Re: Problem in getting... 05-23-2015, 03:35 AM
apo Re: Problem in getting... 05-24-2015, 05:02 AM
brandedadnan Re: Problem in getting... 05-24-2015, 06:13 AM
brandedadnan Re: Problem in getting... 05-24-2015, 06:17 AM
apo Re: Problem in getting... 05-24-2015, 06:28 AM
  1. #1
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Problem in getting complete recipe/ Comprehensive recipe

    Hi..

    Try this.. Click on the button in the attached file.

    Enter your Recipe codes from B3 down in the Results sheet..

    Any Recipe code that can't be found is displayed in a Msgbox at the end along with the cell it is located at..

    Private Sub CommandButton1_Click()
        Dim RecArray, fVal As Range, i As Long, nf As String
        RecArray = Application.Transpose(Range("B3:B" & Range("B" & Rows.Count).End(xlUp).Row))
        With Sheets("Total Recipe")
            For i = LBound(RecArray) To UBound(RecArray)
                Set fVal = .Columns(1).Find(RecArray(i))
                If Not fVal Is Nothing Then
                    fVal.CurrentRegion.Resize(fVal.CurrentRegion.Rows.Count + 3).Copy
                    Sheets("Results").Range("G" & Range("H" & Rows.Count).End(xlUp).Row).Offset(2).PasteSpecial Paste:=xlPasteAll
                Else
                    nf = nf & "B" & i + 2 & "-" & RecArray(i) & " "
                End If
            Next i
            If nf <> "" Then MsgBox "The Following Recipes were NOT FOUND:" & vbLf & vbLf & Join(Split(nf, " "), vbLf)
        End With
        Sheets("Results").Columns.AutoFit
    End Sub
    Attached Files Attached Files
    Last edited by apo; 05-24-2015 at 05:06 AM. Reason: Minor change..

+ 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. Getting the whole recipe
    By brandedadnan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2015, 04:11 AM
  2. Getting the whole recipe
    By brandedadnan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-20-2015, 02:59 AM
  3. [SOLVED] Recipe Change
    By ruthdyson in forum Excel General
    Replies: 1
    Last Post: 08-22-2013, 05:27 AM
  4. [SOLVED] Drink Recipe Spreadsheet
    By Runnin L8 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-02-2012, 11:18 AM
  5. [SOLVED] Recipe Breakdown
    By NightSprite in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-03-2012, 04:22 PM

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