Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-08-2016, 01:33 PM
ljg713 ljg713 is offline Finding the nth Blank Value in a Row of Text Windows 7 64bit Finding the nth Blank Value in a Row of Text Office 2010 64bit
Novice
Finding the nth Blank Value in a Row of Text
 
Join Date: Dec 2015
Posts: 20
ljg713 is on a distinguished road
Default Finding the nth Blank Value in a Row of Text


I have a row of text (not sure if this is relevant, but the text isn't purely typed, it is a formula of concatenations and if statements).

Some cells appear blank (although they still have the same ifelse/concatenation formula, but end up being "")

So, basically I have a row of formulaic text that looks like this

A1 B1 C1 D1 E1 F1 G1 H1 I1 J1

I want to use the range E1 through H1, and write a formula in a different worksheet that will order these by non-blank cells. So, I need to find the first nonblank cell, 2nd nonblank cell, 3rd, and 4th. Because some of these cells are blank, not all 4 of the spots will be fill, but the formula needs to make sure that if there is text in all of them then it will fill in order.


=IF(COUNTIF(E1:H1,"?*")>=2,INDEX(E1:H1,SMALL(IF(E1 :H1<>"",COLUMN(E1:H1)-COLUMN(E1)+1),1)),"") (for the first nonblank)

=IF(COUNTIF(E1:H1,"?*")>=2,INDEX(E1:H1,SMALL(IF(E1 :H1<>"",COLUMN(E1:H1)-COLUMN(E1)+1),2)),"") (for the 2nd nonblank), etc.

I have been trying this array formula, and it works for finding the first two non-blank text values, but when I try to find the 3rd and 4th nonblank values, if there is a blank value, instead of just a blank I am getting #NUM!.

Any ideas?
Reply With Quote
 

Tags
formula help



Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding the nth Blank Value in a Row of Text finding a string containing a combination of formats and adding text before Marco Word VBA 1 11-02-2015 05:08 PM
Finding the nth Blank Value in a Row of Text Finding and Replacing a word with text copied to clip board spc94 Word VBA 3 06-25-2015 04:46 AM
Finding varying text in an MS Word file sergiodcq Word 1 07-08-2014 03:12 AM
Finding specific text within body of email Tammfran Outlook 0 03-14-2014 02:32 PM
Finding a text style in a cell jimbassett Excel 1 02-10-2010 08:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft