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 9158261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:12:21+00:00 2026-06-17T13:12:21+00:00

There are three columns. one has some names of tables and second column has

  • 0

There are three columns. one has some names of tables and second column has its free space and third has percentage used.

help required is:

  1. Msgbox should display the value of PERCENTAGE USED column in the cell it finds more than 90.
  2. Also it should display the name of the corresponding table and the free space of the table for which it is displaying the value in step one.

msgbox output should be:
“ABCD table is 96.67% used and space left is: 7431MB ”

Sample Code which displays only table name and percentage used:

Dim rngValues As Range
Dim strTableName As String
Dim cell As Range

 ' Adjust ranges to suit
 Set rngValues = [JI3:JI90]
For Each cell In rngValues
       If cell.Value > 94.45 Then
       cell.Select

       MsgBox Range(cell.Address).Offset(0, -268).Value _
       & " table has current size: " & cell.Value
       cell.Interior.Color = RGB(255, 0, 0)

       End If

Sample output of this code : ABCD table has current size : 97.87%

  • 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-06-17T13:12:22+00:00Added an answer on June 17, 2026 at 1:12 pm

    One way to solve this problem is to use a second Range(cell.Address).Offset().Value statement to append the additional information to the text being displayed by the message box. The exact code is going to depend on how many columns away from column ‘JI’ the column showing the free space left is.

    Assuming that it is the column before the one containing the % space used you could do the following:

      MsgBox Range(cell.Address).Offset(0, -268).Value _
       & " table has current size: " & cell.Value _
      & " and the space left is: " & Range(cell.Address).Offset(0, -1).Value
    

    If it isn’t the column before the one containing the % space used you simply need to adjust the column offset in Range(cell.Address).Offset(0,-1).Value properly. For example if the column containing free space occurrs 9 columns after column JI change the Offset to Offset(0,9)

    The first argument between the parentheses for Offset is the number of rows and the second one is the number of columns. negative offsets specify rows or columns appearing before the selected cell, postivive specify rows or columns appearing after the selected cell. ‘0’ specifies the current row or column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of the tables in my database has three columns. They are dt_id (PK),
I have a table column where each row has one of three states, and
Lets say I have one row with three columns - some buttons on left
I have 2 joined tables, each one has a primary key column named id.
How would I combine the two columns if there is a Null in one
I have a composite index on three column in one of my table. It
I have three column in my datagridview .One is text ,one is Combo and
I have a database table named 'student' in which there is one column named
Is there a way to GROUP BY using one column, but a set of
There is one table , and I want the unique values of table column

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.