Repeating Macro Column By Column Until It Hits Blank?

Feb 21, 2014

This is for a template for teachers to analyze student testing data. On sheet4, wrong answers in each column are noted by a lack of a + in the corresponding cell. I want to paste the names of the students who missed each question into sheet 5.

I've done it by repeating a filter macro, but I manually copied the following separately for the 75 columns in the template.

Problem #1 - there must be a more efficient code, something that automatically loops to the next column

Problem #2 - the template has 75 columns, but many tests have fewer questions. I'm trying to find a way to stop the loop whenever it hits a blank cell in Row 10 on sheet 4. I've done it with an if/then in the last section on the above code, but where I'm at now, i would have to add that to the code section for each column. Which isn't that big a deal, but I figure there must be a better way.

The relevant portions of the workbook are attached here.

repeating macro until hits blank cell sample.xlsm

View 4 Replies


ADVERTISEMENT

Macro To Go Through One Column Until It Hits Blank Cell And Stop?

Mar 25, 2014

I need a macro to go through one column until it hits a blank cell and stop... the criterea of the loop:

if cell = "Multi" then **Move to X tab** else **move to X2 tab**

View 1 Replies View Related

Excel 2010 :: Search And Highlight Hits Only In Column C?

Jun 11, 2013

In an Excel 2010 worksheet I use three columns. I need a user to be able to input a word or phrase into a cell or input box, and have Excel highlight that word or phrase every place it occurs only in column C.

Can I do that with conditional formatting? Or do I need to use a function? Or do I need a macro?

View 5 Replies View Related

VLookup Return Multiple Hits From Same Column Of Data

Jul 14, 2009

I am running a Vlookup on a large set of ID#'s that exist accross multiple servers.

The data is structured in (2) columns how you see below , and you will notice that the same ID# can show up on multiple servers.

However, the VLOOKUP is only returning the first match it finds.

Assuming that I want to keep the data structured as is, how do I make the vlookup return all matches?

ID# LOCATION

23 SERVER1
34 SERVER4
23 SERVER2
13 SERVER1
17 SERVER3
34 SERVER1

View 10 Replies View Related

Macro - If Cell In Column Is Blank Then Input Text Into Same Row In Another Column

Sep 19, 2008

I am looking for a Macro that will search a column for blank cells, and when one is found will add text to the same row in another column. For example: The below is a spreadsheet. I am trying to find something that will search through column "C" in this case and add text (of my choice) to Column "A" if the cell is Blank. So Since cell C1 is Blank then Type "ERROR" is cell A1.

A B C D E
1 X X X X
2 X X X X
3 X X X X X
4 X X X X
5 X X X X

View 9 Replies View Related

If Column Contains Data Then Insert A Blank Column And Shift Specific Column To The Right

Apr 22, 2009

What I'd like to do is; If column C contains data then insert a blank column and shift column C to the right.

View 4 Replies View Related

Repeating Row To Column Conversion?

Dec 19, 2013

I have a file that I converted to excel and am trying to now convert from rows to columns. So far I have set up the code to do it 3 times but need it to repeat every 12 rows. Here is what I have so far:

Sub rowtocolumn()
'
' rowtocolumn Macro

[Code]....

Not sure what to do to make it repeat?

View 3 Replies View Related

AutoFill Column With Repeating Numbers

Dec 26, 2012

I have a spreadsheet that lists numbers in a column. They increase 1 number at a time, however the same number is listed 24 times before increasing to the next. Scaled down to 3 times it would look like this: 111, 222, 333, 444, 555, each one of those individual numbers would have their own cell. When I highlight the column and drag down, it starts doing decimals..how do I get it to recognize it? sample.xlsx

I want to drag it down to continue the pattern. Right now, I type a couple of numbers and drag to finish the section.

View 3 Replies View Related

Subtracting Column B From A, And Leave Third Column Blank If No Value In Column B?

Oct 6, 2008

I have a spreadsheet with three columns (A,B,C). I want the third column C to be column A - B (A minus B) for each row, but only if there is a value in column B.

If there is no value in column B, then I want that row in Column C to just stay blank.

View 4 Replies View Related

Matching Multiple Repeating Values In One Column With Another

Oct 23, 2009

Matching Multiple repeating values in one column with another.

I have a three columns of data that I need to map the requird Ids in Col A against multiple repeats in Col C. AS per data below ....

View 6 Replies View Related

Random Number Generation Without Repeating Across Same Row Or Column?

Nov 24, 2011

Been trying to think of a way to get random numbers 1 to 36 generated without repeating in the same column, however also getting it to perform the same opertaion in 9 more columns (B:J) without the same number appearing in the same row.

example

1 2 5 4
2 5 3 1
3 4 1 5
4 1 2 3
5 3 4 2

Unsure if this is possible, have created a basic script for random number generation but have no clue how to expand across columns.

View 9 Replies View Related

Single Column To Repeating Pattern Of Columns?

Nov 22, 2013

CartonNo1

ProductNo1

LotNo1

LotNo2

CartonNo2

ProductNo1

LotNo3

LotNo4

In the above (repeating for say, 50 or more cartons), is there a way with a macro(I know nothing about) or pivot table(see macro) to get the following format/result?

CartonNo1
ProductNo1
LotNo1

CartonNo1
ProductNo1
LotNo2

[code].....

View 6 Replies View Related

Convert Repeating Rows Into Column Head

Mar 26, 2009

I have an excel spreadsheet containing data in two column layout :

States, Cities

UP, Ghaziabad
UP, Agra
UP, Lucknow
UP, Kanpur
UP, Allahabad
Punjab, Amritsar
Punjab, Ludhiana
Punjab, Jalandhar
Punjab, Patiala

How can I covert it in following layout i.e convert repeating rows into column headings ?

Punjab, UP

Amritsar, Ghaziabad
Ludhiana, Agra
Jalandhar, Lucknow
Patiala, Kanpur
, Allahabad

View 9 Replies View Related

Highlight Blank Cells Red In Column G If Not Blank In Column C (same Row)

Feb 17, 2010

I would like a macro to do this...If a cell in column G is blank and the cell in the same row in column C is NOT blank, highlight the blank cell in column G Red.

I need the search to stop ONLY when it gets down to the bottom-most row of data in column A.

Note: Any row headers will always be in row 1 only

Current...

View 9 Replies View Related

Parse Through A Column Of Numbers And Find A Repeating Pattern

Mar 13, 2009

I need a function or VB code to parse through a column of numbers and find a repeating pattern. The column has some initial numbers that do not fit the pattern and I need those returned along with the repeating pattern.

View 11 Replies View Related

Macro Insert Cells In First Blank Column

Jul 6, 2008

I am trying to come up with a code that will copy column A entirely, and insert the copied cells into the first blank column. In the columns with information in them, there will always be text in the first cell, so that can be used as the test to find the first blank column, but I'm not sure how to get this done for my macro.

View 12 Replies View Related

Macro To Find Next Blank Cell In A Particular Column

Jul 15, 2009

I am trying to write a macro that will do a bunch of stuff then go to the next blank cell in a particular column.

The rest of the code for the macro is irrelevant I just don't know how to code it to find the next blank cell in the column. It could be anywhere from cell A2 to A1000000. Basically I want the macro to select the cell that is next on the list to enter data into.

View 8 Replies View Related

VBA Macro For Filling Blank Cell In Whole Column

Mar 1, 2012

I need a VBA macro for filling the blank cells in whole column "D" with some conditions.This condition work for whole column.

ABCDCN
EA
Polymer

DE
MA
Polymer
Medium
CN
EA
Polymer

Fill the blank cell in D column with "Easy", if Column A is "CN" and column B is "EA"
Fill the blank cell in D column with "Medium", if column A is "DE" and column B is "MA".

After Run the macro:
i.e
ABCDCN
EA
Polymer
Easy
DE
MA
Polymer
Medium
CN
EA
Polymer
Easy

I was used "if" condition but I can't able to run.

View 2 Replies View Related

Macro Code To Find Blank Cell In Column

May 30, 2008

Short and simple. What is the quickest, easiest & most efficient way to find the first blank cell within a column using VBA?

View 9 Replies View Related

Sort Column To Match Pair In Other Column, Skip Blank Spaces

Mar 28, 2007

Here's what I have.. (on a much smaller scale)

http://www.jmetenterprises.com/produ...pics/excel.jpg

(notice how the lines that match are now even.)

[Edited by admin~ *Link* to large images, don't display them]

View 9 Replies View Related

Updating Values In Variable Ranges Based On Repeating Patterns In A Column

Jul 6, 2006

I have a list of two columns. Here’s an example. The left most column provides the row number.

_ A B
1 1 0
2 2 1
3 2 1
4 3 2
5 4 2.5
6 5 4
7 1 0
8 1 0
9 2 2

Whenever there are two repeating numbers in column one, I want to reduce certain numbers in column 2 by a certain amount. The amount is determined by half the difference between the number in column B corresponding to the second repeated number and the number in column B corresponding to the row after the second repeating number. The range of numbers that are to be reduced begins with the row after the second repeating number and ends with the last row before number one appears in column A. The values in column A are integers, always starting with one. For example, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 4, 5.

For the above example, after finding the repeating number two’s at A2 and A3, it would reduce B4 through B6 by half the difference between B3 and B4 (1/2). The values for B4 through B6 would be updated in column B. The same for the next repeated numbers, which is one at A7 and A8. Half the difference between B8 and B9 is 1.

Here’s what the updated list would look like:

1 1 0
2 2 1
3 2 1
4 3 1.5
5 4 2
6 5 3.5
7 1 0
8 1 0
9 2 1

View 9 Replies View Related

Find The Column Name Purple & Delete The Whole Column If There Are No Blank Cells

Mar 18, 2009

I'd like a macro that does 3 things..

1. Find the last row (cell) of data in the "Customer Number" column. This search should be by the name "Customer Number" rather than by column letter because the column that "Customer Number" will be in can change.

2. Find the column named "Purple" (also by name for same reason)

3. If the "Purple" column has no blank cells in those same number of rows as the "Customer Number" column, delete the whole "Purple" column.

View 11 Replies View Related

How To Copy Value From Column A After Blank Line And Insert Text In Column B

Mar 21, 2014

I have a workbook that usually looks something like this

Category Product No description Price

Balloons 12345 Red Disney balloon .50
Balloons 12567 Blue Princess balloon .86
Balloons 76521 Angry Birds Balloon .80

Kites 23456 A Big red Kite .27
Kites 22222 A small blue kite .06

Banners 10000 Party banner .33

etc..

I need to find a way to copy the category below an empty row from column A and paste it in the blank row in column B . If possible to bolden the text but I could probably work that bit out myself. I'm new to this but have used VBA before to run macros.

View 6 Replies View Related

Macro To Search Column For Blank Cells & Shift Entire Row Right?

Nov 2, 2008

I am trying to write a macro to do the following:

Search column "I" for blank cells. If one is found then all adjacent cells to the left in that row are shifted to the right by one. (in other words for that row cells A-H are shifted right to become cells B-I).

View 3 Replies View Related

Macro To Search Column For Blank Cells & Shift Entire Row Right

Nov 2, 2008

Search column "I" for blank cells. If one is found then all adjacent cells to the left in that row are shifted to the right by one. (in other words for that row cells A-H are shifted right to become cells B-I).

View 2 Replies View Related

Macro To Search For Blanks In A Column And Enter Static Value For Each Blank?

Jun 18, 2013

So this is what I am trying to do, I have a column in my data that is for telephone numbers. When I receive the file some of the fields are blank in that column. I need to add to my current macro a part that evaluates the column for blanks and adds a static telephone number in the blanks (up to the last row of data in the file). I have been able to accomplish this with the following:

Range("N2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "1112223333"

However, when the file that I receive has a telephone number in all the fields the code breaks at this point. I have tried On Error Resume Next, but that just replaces all the remaining cells in the column with the static 1112223333..

View 3 Replies View Related

Formula To Find A Value In Column A Corresponding To First Blank Cell In Column B?

Aug 7, 2013

A
B

1
Name
Action

2
Joe
Created

3
Bob
Approved

4
Cindy

5
Jane

6
Dave

7

View 1 Replies View Related

VBA To Copy Non-blank Cells From Column And Paste Into Another Column

Oct 4, 2013

In sheet "diary" I have data in certain rows in column A8:C10000 that contains values if a certain condition is met. I need a vba to copy and past only non blank cells in column D8:F10000. I first wrote a formula with index but it takes too long to caculate.

View 9 Replies View Related

Count Column Based On Certain Text In One Column And Blank In Another

Feb 4, 2014

I need to count column E when it does not say "MTO" or if column G is blank. E.g. below would return me a value of 2. I would count row 1 and 3 only.

Column E Column G
10-Jan-14
MTO
06-Dec-13
18-Oct-1321-Oct-13

View 9 Replies View Related

If Column B Has Anything Entered In It - Leave Column A Blank

Jun 13, 2013

How can I leave Column "A" blank if any data what so ever is entered in Column "B"?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved