xldown counting blank string cells from formulas

szymagic

Board Regular
Joined
Jul 8, 2016
Messages
61
Hello,

My problem is that I have an xldown finding the last row in my data, however it drops down to the bottom of a formula I have in place. This formula will returns blanks, and I'd like xldown to ignore these blanks. So the column looks like this:

.......A
1.....10
2.....82
3.....43
4.....30
5.....""
6.....""
7.....""

I want the cell A4 not A7.
I apologize if there is already a thread on this matter, but I couldn't find any.
Thanks a bunch!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
question 1: "" <---does this represent blank cell?
question 2: post code you have already

comment: if you use xldown you will be not skip blank rows so suggest use xlup instead of xldown

edit: my bad. misunderstood your question.
 
Last edited:
Upvote 0
Code:
Windows("Priority Calculator.xlsm").Activate
    Range("AO85:AO285").Select
    Selection.Copy
Windows("GIS_Table.csv").Activate
    Range("A2").Select
    ActiveCell.End(xlDown).Select
    lastrow = ActiveCell.Row
    Cells(lastrow + 1, 1).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
Windows("Priority Calculator.xlsm").Activate
    Range("AO83").Select
    Selection.Copy
Windows("GIS_Table.csv").Activate
    Range("A2").Select
    ActiveCell.End(xlDown).Select
    x = ActiveCell.Row
    Range("B2").Select
    ActiveCell.End(xlDown).Select
    Range(Cells(lastrow + 1, 2), Cells(x, 2)).Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

Here it is, it is supposed to paste a large range of cells in column A, that could or could not have data in them. Then find the last row where there is data, and then paste the same value in column B in an array from column B's last row of data to the last row of data in column A.

Go easy on me, I am such a greenhorn at this haha,
Thanks for all your help
 
Upvote 0
Can you use something like this. This seems to work. Hope this helps.

Excel 2012
ABC
11030
282
343
430
5""
6" "
7""

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
C1=LOOKUP(2,1/ISNUMBER($A$1:$A$7),$A$1:$A$7)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>


<tbody></tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,883
Messages
6,122,077
Members
449,064
Latest member
MattDRT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top