Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7534453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:01:12+00:00 2026-05-30T06:01:12+00:00

I’m now able to tabulate the % after matching the values from sheet 1

  • 0

I’m now able to tabulate the % after matching the values from sheet 1 with sheet 2 with the help of Sid. But now, I’m facing this problem,

The following is an image of a problem that i’m facing currently.

In Image1, it is just some test results to be tabulated into %.
enter image description here

After much help, i’m now able to tabulate it but if you notice after Column H, the result continues to tabulate because i have set the settings all the way til Column Z.
enter image description here

I’m required to prepare for tests with more columns that is why i set the set til Column Z. What i’m curious about is, is it possible for me to clear all #DIV/0! when there are no more results?

Thank you once again!

Follow up:
My code is as of below:

Sub Macro3()

Dim ws As Worksheet
Dim wsData As String
Dim SearchText As String, Excludetext As String
Dim LastRow As Long, i As Long, j As Long
Dim MyArray() As String
Dim boolContinue As Boolean

'start making Yield_summary into %
'~~> Add/Remove the text here which you want to ignore
Excludetext = "Split,Grade,Wafer,temp,Qty. In,Qty. Out,Bin1,Bin2,Bin3,Bin4,Bin5,Bin6"

'~~> Change this to the relevant sheetname which has the data
wsData = "Sheet1"

MyArray = Split(Excludetext, ",")

Set ws = Sheets("Sheet2")
LastRow = ws.Range("A" & Rows.Count).End(xlUp).Row

'Set Column B into %
For i = 1 To LastRow
    boolContinue = True

    For j = 0 To UBound(MyArray)
        SearchText = MyArray(j)
        If ws.Range("A" & i).Value = SearchText Then
            boolContinue = False
            Exit For
        End If
    Next j

    If boolContinue = True Then
        With ws.Range("B" & i)
            .Formula = _
            "=OFFSET(INDIRECT(ADDRESS(INDEX(MATCH(A" & i & _
            "," & wsData & "!$A$1:$A$50,0),1,0),1,1,TRUE,""" & _
            wsData & """)),0,1)/" & wsData & "!B5"
            .NumberFormat = "0.00%"
        End With
    End If
Next i

'Set Column C into %
For i = 1 To LastRow
    boolContinue = True

    For j = 0 To UBound(MyArray)
        SearchText = MyArray(j)
        If ws.Range("A" & i).Value = SearchText Then
            boolContinue = False
            Exit For
        End If
    Next j

    If boolContinue = True Then
        With ws.Range("C" & i)
            .Formula = _
            "=OFFSET(INDIRECT(ADDRESS(INDEX(MATCH(A" & i & _
            "," & wsData & "!$A$1:$A$50,0),1,0),1,1,TRUE,""" & _
            wsData & """)),0,2)/" & wsData & "!C5"
            .NumberFormat = "0.00%"
        End With
    End If
Next i
End sub'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:01:13+00:00Added an answer on May 30, 2026 at 6:01 am

    I can see from Sid’s answer to your previous question that you are putting a formula in your cells like this:

        With Range("B" & i)
            .Formula = _
            "=OFFSET(INDIRECT(ADDRESS(INDEX(MATCH(A" & i & _
            ",$A$1:$A$45,0),1,0),1,1,1,'Duplicated_Sheet1')),0,1)/$B$5"
            .NumberFormat = "0.00%"
        End With
    

    You can follow up by checking whether the formula returns an error (e.g. #DIV/0!), and if so, remove the formula, since it isn’t useful:

        If IsError(Range("B" & i)) Then
            Range("B" & i).ClearContents
        End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I have a jquery bug and I've been looking for hours now, I can't
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.