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

The Archive Base Latest Questions

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

I have a list of values that I need to format for processing and

  • 0

I have a list of values that I need to format for processing and the format of the data isn’t suitable in it’s current form.

The values are currently in the following format:

There are far too many records to attempt this manually. What’s the best way to automate the process, either with a formula or VBA?

EDIT: The values in C3:C4 appear for each set of records in the sheet. The number of cells below them can vary from 1 to 3,000.

Thanks for your help.

EDIT: Tim you’ve been a huge help and I massively appreciate it – the edited version didn’t work though for some reason. In any case, I modified it very rudimentarily to loop back through and empty the cell values for the ones I didn’t want marked. Thanks again.

Sub Tester()

Const STATUS_FLAG As String = "status code:*"

Dim v1, v2
Dim c As Range
Dim sht As Worksheet

    Set sht = ActiveSheet
    Application.ScreenUpdating = False
    For Each c In sht.Range(sht.Range("C1"), sht.Cells(Rows.Count, 3).End(xlUp))
        If c.Value Like STATUS_FLAG Then
            v1 = c.Offset(-2, 0)
            v2 = c.Offset(-1, 0)
        ElseIf c.Value Like "http:*" Then
            c.Offset(0, -2).Value = v1
            c.Offset(0, -1).Value = v2
        End If
        If c.Value Like STATUS_FLAG Then
            c.Offset(-2, -2).Value = ""
            c.Offset(-2, -1).Value = ""
            c.Offset(-1, -2).Value = ""
            c.Offset(-1, -1).Value = ""
        End If
    Next c
    Application.ScreenUpdating = True

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-06-13T15:17:14+00:00Added an answer on June 13, 2026 at 3:17 pm

    EDIT: don’t fill in next to “source” paths (v1, v2)

    Sub Tester()
    
    Const STATUS_FLAG As String = "Status code:*"
    
    Dim v1, v2
    Dim c As Range
    Dim sht As Worksheet
    
        Set sht = ActiveSheet
        Application.ScreenUpdating = False
        For Each c In sht.Range(sht.Range("C1"), sht.Cells(Rows.Count, 3).End(xlUp))
            If Len(c.Value)=0 Then
                'reset on blank row
                v1=""
                v2=""
            ElseIf c.Value Like STATUS_FLAG Then
                v1 = c.Offset(-2, 0)
                v2 = c.Offset(-1, 0)
            ElseIf c.Value Like "http:*" and Len(v1)>0 Then
                c.Offset(0, -2).Value = v1
                c.Offset(0, -1).Value = v2
            End If
        Next c
        Application.ScreenUpdating = True
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to format an array from a list of values. Currently I have
I have a function that returns two values in a list. Both values need
Say I have a form that contains a drop-down list populated by values stored
I have a list of string values that I want add to a hashtable
I have one spinner, and I am populating that. I have list of values
I have a binary file of unknown format that I need to be able
I have a list of time values in this format 09.00 AM, 12.00 PM,
I have a hidden form field that stores the values of a jQuery UI
I have a view that list Parts in a htmltable format from a database
Given data in the following format (tag_uri image_uri image_uri image_uri ...), I need to

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.