=IF('Sheet1'!H2="","",'Sheet1'!H2) formula

matrix26

Board Regular
Joined
Dec 16, 2020
Messages
57
Office Version
  1. 365
Platform
  1. Windows
Hi,
I'm using this formula to check if a specific cel reference on a sheet has any data in it and if it does then that is copied to the relevant cell
=IF('Sheet1'!H2="","",'Sheet1'!H2)

How would I amend this so that if it found a blank cell on Sheet1 it filled the relevant cell with the word PAUSE and stopped processing any following lines, I don't want lots of lines with PAUSE?

Is this even possible?

Thanks in advance
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi Matrix26,

If this is your Sheet1

Matrix26.xlsx
H
1Data
2Dog
3Cat
4Goat
5
6
7
8
9
Sheet1


Then this would do as you ask

Matrix26.xlsx
H
1Pull Data
2Dog
3Cat
4Goat
5PAUSE
6 
7 
8 
9 
10 
Sheet2
Cell Formulas
RangeFormula
H2:H10H2=CHOOSE(MIN(3,COUNTIF(Sheet1!$H$2:$H2,"")+1),Sheet1!H2,"PAUSE","")
 
Upvote 0
Solution
Hi Matrix26,

If this is your Sheet1

Matrix26.xlsx
H
1Data
2Dog
3Cat
4Goat
5
6
7
8
9
Sheet1


Then this would do as you ask

Matrix26.xlsx
H
1Pull Data
2Dog
3Cat
4Goat
5PAUSE
6 
7 
8 
9 
10 
Sheet2
Cell Formulas
RangeFormula
H2:H10H2=CHOOSE(MIN(3,COUNTIF(Sheet1!$H$2:$H2,"")+1),Sheet1!H2,"PAUSE","")
This is both my sheets.

Sheet 1 user input is in columns B and D. This input can vary, as can the number of rows of data entered.
Column H on sheet 1 has this =IF(B2="","",CONCATENATE(A2,(B2),(C2),(D2),(E2),(F2)))

Sheet 2, from cell F2 should pull the data from Sheet1 column H until it finds a blank cell then it should fill that cell with the word PAUSE.

Would the above still work?
 

Attachments

  • Sheet 1.JPG
    Sheet 1.JPG
    62.6 KB · Views: 6
  • Sheet2.JPG
    Sheet2.JPG
    77.1 KB · Views: 6
Upvote 0
I can't answer that as I don't know what your .bat icon does with cells containing a formula.
 
Upvote 0
Hi,

.bat will transfer an IOS file from a server location on to a device.

Technically I don't really need the PAUSE command at the end.
I'd just like to have it so the user can see the transfers have completed.
 
Upvote 0
=IF(ISNUMBER(SEARCH("pscp -pw Pa$$word101 -scp L:/stablenet_backups/",Sheet1!H2)),Sheet1!H2,"PAUSE")

Gives me this

:: This batch file will transfer IOS
ECHO OFF
:: TRANSFERRING
pscp -pw Pa$$word101 -scp L:/stablenet_backups/TEST 1 USERNAME@TEST:TEST 1
pscp -pw Pa$$word101 -scp L:/stablenet_backups/TEST 2 USERNAMETEST:TEST 2
pscp -pw Pa$$word101 -scp L:/stablenet_backups/TEST 3 USERNAME@TEST:TEST 3
pscp -pw Pa$$word101 -scp L:/stablenet_backups/TEST 4 USERNAME@TEST:TEST 4
pscp -pw Pa$$word101 -scp L:/stablenet_backups/TEST 5 USERNAME@TEST:TEST 5
pscp -pw Pa$$word101 -scp L:/stablenet_backups/TEST 6 USERNAME@TEST:TEST 6
PAUSE
PAUSE
PAUSE
PAUSE
PAUSE
PAUSE
PAUSE
PAUSE

How do I get rid of the all the PAUSES after the 1st one?
 
Upvote 0
see if this works

Excel Formula:
=IF(OR(H1="PAUSE",H1=""),"",IF(ISNUMBER(SEARCH("pscp -pw Saturd@y101 -scp L:/stablenet_backups/",Sheet1!H2)),Sheet1!H2,"PAUSE"))

EDIT

I do not see any problem in the formula which @Toadstool provided in POST # 2

What is wrong in that ????
 
Upvote 0
see if this works

Excel Formula:
=IF(OR(H1="PAUSE",H1=""),"",IF(ISNUMBER(SEARCH("pscp -pw Saturd@y101 -scp L:/stablenet_backups/",Sheet1!H2)),Sheet1!H2,"PAUSE"))

EDIT

I do not see any problem in the formula which @Toadstool provided in POST # 2

What is wrong in that ????
Hi Matrix26,

If this is your Sheet1

Matrix26.xlsx
H
1Data
2Dog
3Cat
4Goat
5
6
7
8
9
Sheet1


Then this would do as you ask

Matrix26.xlsx
H
1Pull Data
2Dog
3Cat
4Goat
5PAUSE
6 
7 
8 
9 
10 
Sheet2
Cell Formulas
RangeFormula
H2:H10H2=CHOOSE(MIN(3,COUNTIF(Sheet1!$H$2:$H2,"")+1),Sheet1!H2,"PAUSE","")
GENIUS, THANK YOU
 
Upvote 0

Forum statistics

Threads
1,215,001
Messages
6,122,648
Members
449,092
Latest member
peppernaut

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